Downgrading versions of terraform
We upgraded our openvpn infra to terraform 1.0.X, but we have an RDS module that is at 0.12.X and it uses state from the openvpn infra. what is the preferred method to downgrade the terraform version of an existing piece of infra? We can destroy it, remove the state file, and the DynamoDB entry, or revert to an previous version of the state file, and adjust the dynamo DB s3 object version, right? is there a better way? is one of these methods preferred?
Your suggestions are perfectly reasonable. If the configuration of your OpenVPN infrastructure hasn't changed between the old 0.12.x and the new 1.0.X, I think it's simplest to revert to the previous version of the state file and adjust the dynamoDB S3 object accordingly: 1) Revert state file 2) Adjust dynamoDB S3 object 3) Run a terraform-0.12.x plan on the OpenVPN infrastructure and make sure it runs clean If you have made modifications or the tf plan (with version 0.12.x) doesn't run cleanly, then you can take the next more drastic step of rebuilding the OpenVPN infra. Less desirable, obviously, due to downtime.