Open to feedback, there is likely a better way to implement this. I took a first swing at the docs, but I wasn't sure where to start on testing.
Tested with Terraform version 1.7.0.
# kvm host used for testing
ubuntu@test:~$ uname -a
Linux test 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@test:~$ kvm --version
QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.16)
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
# /etc/systemd/system/test-wait.service in guest VM to validate delayed shut off.
[Unit]
Description=...
[Service]
Type=oneshot
RemainAfterExit=true
ExecStop=/usr/bin/sleep 90
[Install]
WantedBy=multi-user.target
Open to feedback, there is likely a better way to implement this. I took a first swing at the docs, but I wasn't sure where to start on testing.
Tested with Terraform version 1.7.0.
Fixes: #356, #1060