When upgrading from 0.12.x to the latest, what about dependencies?

If I am running terraform 0.12.x, and I follow the upgrade path to 0.13 and onwards, what about the modules that my terraform depends on?
If they are also old (0.12.x), does this mean I have to take full ownership of all my dependencies and upgrade them also?

Hi @ooh,

If you are relying on other modules that were written for Terraform v0.12 and that haven’t yet been updated for modern Terraform, then indeed you may need to fork them and upgrade them yourself.

That isn’t necessarily true, though. Some of the upgrade work done when switching to Terraform v0.13 is changes to the Terraform state rather than to the configuration, making them “global” changes that affect the entire configuration at once during the apply step, and so it’s possible that at least some of the modules might be configuration-compatible with Terraform v0.13, and so would not need their source code modified as part of your upgrade.

I would suggest rehearsing the upgrade in an environment separate from your main environments so you can determine whether these modules are compatible with Terraform v0.13 or not. To do that, I expect you’ll need to first apply the new environment with Terraform v0.12 and then perform the upgrade steps as you would in your current environment.

1 Like

Yes I will not test this in PROD :slight_smile:
Thanks for the tips.