Upgrade from 0.12 to 0.13 - before upgrade clarification

Hi all,

The upgrade 0.13 guideline says the following:


For this upgrade in particular, completing the upgrade will require running terraform apply with Terraform 0.13 after upgrading in order to apply some upgrades to the Terraform state, and we recommend doing that with no other changes pending.

Does this mean that the upgrade path recommended is the following one?
1- You should apply terraform 0.13 with the same configuration files (adapting the providers and sources) you had with terraform 0.12 (without making any changes to your resources), so that the tfstate is updated
2- Make your resource configuration changes in the code
3- Apply again with terraform 0.13 + with the resource changes.


Yes, that’s correct. Running terraform apply without any changes allows the state file to be upgraded to the 0.13 format.

Thanks @alisdair !

And I guess that if you run into any issues between steps, rollbacks would be easier/cleaner…

  • If any issues between 1) and 2) - you could restore the previous tfstate and use tf 0.12 + old providers
  • If any issues between 2) and 3) - you could do rollback using your old code (without resource changes), but still using tf 0.13 + new providers