How do I restart a Linode instance with Terraform
I have a Terraform file that spins up a Linode VPS, install a couple of packets that I need for that instance and then make som config changes. After configuration I would like to restart the OS without the need for Lassie to bring it back up but I can't find a solution to this problem.
I first tried 'shutdown -r 1' to restart the server 1 minute after the provisioning is done but the problem is that the server never gets back when I have Lassie disabled.
2 Replies
Hi @Seb -
I found the following post on the Community Questions site that provides steps on how to change the power state of the Linode (reboot, power-on, power-off) with Terraform, that you may find helpful. The solution in the post utilizes the Linode CLI in conjunction with Terraform to achieve the desired power state.
I hope this helps!