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
terraform
block withrequired_providers
to provide thesource
for the provider. - Remove the
version
statement from theprovider
block. (You will want to move it to the provider in therequired_providers
block.) - 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…)