Terraform State File

Hi, we are recently deployed some servers in AWS using Terraform using specific instance types. Later some one has manually modified the instance type to different ones without using Terraform. Now the state file still has the old instance type and if I deploy any new servers how will Terraform treat the exiting servers and how will it work?

Thank you.

The next time you run Terraform with this configuration, you’ll likely see a plan to change the servers back to the instance type you originally configured. Terraform treats your configuration as a statement of the desired state, and proposes changes to get there.

You can address this drift by using the terraform refresh command to update your local Terraform state, then updating your configuration accordingly. This article on detecting and managing drift might be a good read for some more details.

Great…thank you. This worked for me.