If you find yourself with an old Terraform state file (say from v0.11) and you need to run terraform plan to check things out, you’ll need to make some adjustments:
- Add a
terraformblock withrequired_providersto provide thesourcefor the provider. - Remove the
versionstatement from theproviderblock. (You will want to move it to the provider in therequired_providersblock.) - Adjust any other syntax changes that result in errors (
terraform plan):list()→tolist([])type = "string"→type = string- Possibly many others…
- Replace the provider in the existing ancient state file.
- Refresh the providers (
terraform init). - Plan away! (more…)