Upgrading to Terraform v1.0 | Terraform | HashiCorp Developer

We are on a v0.13 which has been broken for AWS RAM using a list compared to for_each as 3 accounts it was configured for were deleted before we removed the TGW routing in code. Now I need to switch to for_each and do a refactoring with ‘moved’ but need to be on v1.1 first. All plans are currently failing, but Maybe I can try upgrading from v0.13 straight to v1.1 with the ‘moved’ in place showing no change? Otherwise this thing is broken and I don’t see a fix.

Without doing anything, All aws_ram_principal_associations are attempting to be replaced as the index integer changed. If I attempt to use ‘moved’ and for_each with a map var input I get:
‘unsupported block type. Blocks of type “moved” are not expected here.’ So I need v1.1 at the very least for the later better solution. I don’t want to incur an outage across 20 VPCs because of the ‘replace’

Hi @benniehanas,

You can still use the terraform state mv command to directly manipulate the resources in the state with older versions of Terraform. You won’t have the option of combining all actions into a single plan to preview the results, but you can individually move each instance in a copy of the state, then run a plan using the new state to make sure that the instances are all where you expect them to be.