dtan4 / terraforming

Export existing AWS resources to Terraform style (tf, tfstate) / No longer actively maintained
http://terraforming.dtan4.net/
MIT License
4.3k stars 658 forks source link

Running Terraform Plan and it says +24, 0 to delete, 0 to Chage.. does this mean it will recreate the resources which I already have #441

Closed netsticker closed 5 years ago

netsticker commented 5 years ago

Hello Dan,

While running Terraform Plan. I am receiving result as:

Plan: 24 to add, 0 to change, 0 to destroy.

Does this mean it will recreate the resources.. I only have 24 resources so far, This is EC2.

I wanna add more but don't wanna do anything with my existing resources as some production apps are running.

Please advice.

Regards

dtan4 commented 5 years ago

Terraform needs state file (tfstate) in addition to tf configurations. Terraform calculates the diff between this state file and tf configurations.

State - Terraform by HashiCorp

Terraform must store state about your managed infrastructure and configuration. This state is used by Terraform to map real world resources to your configuration, keep track of metadata, and to improve performance for large infrastructures.

Therefore, you have to generate tfsate by Terraforming or terraform import command.