Automigration script from TF 0.11.15 to 1.3.9

Our company is using 0.11.15 version of Terraform on its servers an I was wondering if there’s a automatic migration script to convert 0.11 tf files to 1.3.9 ones.
Like for the example the Attributes vs. blocks.

As per previous documentation/release notes you’ll need to upgrade to 0.12 first and the 0.13, etc. There are automated tools to assist with those steps.

1 Like

Hi @anjanesh,

Unfortunately with Terraform v0.11 now being so old the various relevant upgrade guides for you are now a bit buried under newer documentation.

I think the guide to upgrading to Terraform v1.0 is a good starting point though. You’ll see that it includes links to the earlier version upgrade guides that you will need to follow separately first.

Terraform v1.0 started the Terraform v1.x compatibility promises and so you can skip directly to the latest v1.x release at the points in those instructions that talk about upgrading to Terraform v1.0. The upgrades to v0.12 and v0.13 are the ones that require the most attention because they involve the significant changes to the Terraform language and the switch to a new provider distribution method respectively.

Once you get past those two the remaining steps are typically relatives straightforward and don’t require any specific upgrade tools, but still worth reading the upgrade guides to make sure you don’t fall into one of the less common situations that require some extra care.

1 Like

Thanks apparentlymart - I guess I would need to refactor a bit by going through the code base of what tf is getting auto-generated.