Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to ignore terraform_version in remote states #24812

Open
nckbnv opened this issue Apr 30, 2020 · 0 comments
Open

Add an option to ignore terraform_version in remote states #24812

nckbnv opened this issue Apr 30, 2020 · 0 comments

Comments

@nckbnv
Copy link

nckbnv commented Apr 30, 2020

Current Terraform Version

$ terraform --version
Terraform v0.12.24

Use-cases

We have decoupled some of our terraform code in one of our projects from the rest (e.g. centrally create all VPCes, TGW etc) and then utilize the remote state in other accounts and states.

The terraform and provider versions are locked and usually bumped simultaneously, but sometimes you might end up in a situation in which the terraform version was updated on both ends, but you haven't made any changes with the new version, however your plan that relies on remote states will fail with:

Error: state snapshot was created by Terraform v0.12.24, which is newer than current v0.12.23; upgrade to Terraform v0.12.23 or greater to work with this state

Attempted Solutions

The only possible solution currently would be to decouple the state somehow, either with output to json or tools like consul as suggested in #15516 (comment), or not rely on remote states at all.

Proposal

I can see why this is a hard failure for state to which you are going to push changes, but as #15516 (comment) was made 2 years ago, I'm wondering whether it's now possible to make this a soft fail for remote states or add something like ignore_tags on provider level: e.g. ignore_remote_terraform_version

References

#15516
#23290
https://www.terraform.io/docs/providers/aws/index.html#ignore_tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant