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!

Thanks, this will do it! Really hope we will be able to change power state with the Terraform Provider in the future though :)


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct