Upgrade Terraform Cloud from 0.12 to 0.13

hi there,

we are using Terraform cloud for a while on TF v0.12.28. but as our project is upgrading we had to upgrade our TF version to fit higher needs like using count in moulde etc.
I have read some ducuments about Terraform upgrading but seems like there are not documents on how to upgrade Terraform Cloud project.
could you shared me some suggestions? or helpfull documents? because we have a lot of projects in there so we can not bear any errors. it will be best that we have a solution to guilde us how to do this.
looking forward your reply.

Thanks very much,
Bo

Hi @cuntoulishifu!

The details of how to perform this upgrade will depend on how you are using Terraform Cloud. For example, if you are using the VCS-integrated workflow (so Terraform Cloud automatically makes plans based on e.g. GitHub pull requests) or if you are using the CLI workflow (where you run terraform apply locally to manually start a run in Terraform Cloud). You can always ask the support team for help with your specific configuration, whereas in this forum we can only really discuss general process because forum participants like me don’t have any access to your account information.

With that said, the main Terraform v0.13 upgrade process (dealing with Explicit Provider Source Locations) has two main parts:

  1. Changing the configuration of each of your modules to use the new provider requirements declaration syntax.
  2. Running terraform apply to propagate this new information into the Terraform state.

When you’re working in Terraform Cloud, this distinction is important because the configuration-related changes will happen in your development environment outside of Terraform Cloud, while the state changes via apply will typically happen in the remote execution environment and might therefore happen only after you’ve committed the changes to version control (if you are using the VCS workflow).

To help with managing the transition when you need to handle configuration and state separately, Terraform v0.12.28 accepts but ignores the new-style requirements syntax. Therefore you should be able to run through the steps up to (but not including) running terraform apply) in your local development environment for each module you’re working with, check the updated configuration into your version control, but keep using Terraform v0.12.28 in Terraform Cloud until you’re ready to switch and update the state.

Once all of the modules for a particular workspace have configuration updated for Terraform v0.13, you can reconfigure that workspace to use the latest Terraform v0.13 release for remote operations and then your next run where you apply changes will complete the state upgrade portion of the upgrade.

For more details on specific steps relevant to your particular Terraform Cloud configuration, please contact the support team.

1 Like