Hello. I use the last version of terraform (Terraform v1.1.9) and AWS driver version 3.49. So I see, that is a too old driver. I would like to update it to the last version 4.11.
Question:
Can I do refactor directly from 3.49 to 4.11, or I need to upgrade driver for 3.75.1 first?
sodul
May 12, 2022, 6:22pm
2
we are trying to get some guidance on how to upgrade as well.
Something that is pretty clear to me is that you should:
upgrade your provider to the latest 3.x, which is 3.75.1. It is backward and forward compatible, which is really important.
address all the warnings by updating your files to the new syntax (very manual and time consuming if you have lots of resources).
run the import commands, unfortunately there is nothing to automate this AFAIK.
once all your warnings have been addressed, then you can, and should, upgrade to 4.x
For automating the imports I have opened a separate topic yesterday:
We use terraform quite extensively and we are currently on Terraform v1.1.9 and use the AWS provider v3.75.1.
We want to upgrade our syntax to be forward compatible with v4 of the aws provider but the sheer amount of terraform import commands we would have to run is very impractical.
What is the strategy that others have used?
I’m considering to setup a wrapper to automatically run the appropriate import calls for us.
Some options I have in mind are, after calling init:
read the existing s…
1 Like