Terraform State Files

11 views
Skip to first unread message

Charlie

unread,
Jun 25, 2019, 5:52:51 PM6/25/19
to Jenkins Users
Hi All,

I am trying to create a new Azure Linux Virtual Machine using Terraform.
But i want to create this linux virtual machine in the existing already created environment.

For this i want to modify the existing Terraform code and create a new module in the terraform code and run it.

Doubts i have:
When i run the existing terraform code with  adding extra module for creating the linux virtual machine then what happens to the existing state file that is already exists.

will that file remains unchanged and new terraform state file creates or does it get changed.

If there is any change what are the changes can any one explain.

is there any roll back plan if i want to revert the chages (kindly explain)

Note: The state file is stored in the cloud and it is not locked.

LUrban

unread,
Jun 28, 2019, 1:21:28 PM6/28/19
to Jenkins Users
First, this is Jenkins not terraform, but I will answer anyway. Terraform will create a state backup file, but this is only one change history, so if you do two terraform applys, you only have the current state and the previous one (in the state backup file)
Reply all
Reply to author
Forward
0 new messages