AWS - Terraform tries to re-create all the infra

I’m trying to upgrade to terraform v0.11. When running terraform plan it doesn’t recognize actual infra and pretends to create everything again. Any suggestion?

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

Terraform v0.11.13

  • v2.45.0
    remote backend aws s3

Double-check that you are pointing to the same statefile and that the resources have the same names in both configurations.

I asked a very similar question in the main Terraform section but got no responses. However I think I was able to get around it (not sure since I have lots of states to manage).

I believe my problem was that while I thought TF has been last applied with 0.11.X that it was in fact done with 0.10.X, which I found when I examined the state JSON. So, I re-downloaded the correct 0.10.X version and went through a successful plan (TF did not try to recreate anything).

Being extra careful, I did a plan/apply using the last 0.10 version, then switched to 0.11.14 and it worked fine (no changes to AWS). After apply with 0.11.14, I then was able to migrate to 0.12.20

Good luck!

1 Like