-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
gather: update the state handling for terraform 0.12 #1763
gather: update the state handling for terraform 0.12 #1763
Conversation
5d5dfe3
to
ea118b6
Compare
Looks solid to me. I'll defer lgtm to Trevor. |
/test e2e-aws-scaleup-rhel7 |
Utilizing the vendored statefile serialize/deserialize helps installer to no worry about the statefile version conversions. Installer can always assume to use the latest/chosen version of state file from vendored code. For example, terraform 0.12 moves the terraform state to version 4, compared to version 3. With this change installer can assume the terraform state deserialized for use will always be version 4, as it will be upconverted by vendored terraform statefile package.
…m terraform This adds bootstrap and control plane hosts ip gather from state file for platforms.
ea118b6
to
3c89497
Compare
/test e2e-openstack |
/retest |
Do we need this? Running two different installer versions on the same Terraform state file seems like a bigger problem than just "what version is the state file?". For example, maybe we've shuffled some modules around and whatever you were trying to access (the bootstrap IP address?) is now in a different place? |
Yes, we need to try our best to not break people. Keep things backward compatible. This makes sure we can at-least read the terraform state file.
In that case, we'll need to make sure we makes changes to gather to understand old and new locations. If we can keep backward compatible we should. |
But why would you want to read the Terraform state file written by a different installer? The only story I can think of is:
But that's a pretty short window in which to be switching installers. And other actions like changing installers between an |
I'm not sure why the point of contention is depending on terraform code itself to read the state file. |
/test e2e-aws-scaleup-rhel7 |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, jstuever The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
@abhinavdahiya: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
pkg/terraform: utilize the vendored terraform to read tfstate
Utilizing the vendored statefile serialize/deserialize helps installer to no worry about the statefile
version conversions. Installer can always assume to use the latest/chosen version of state file from vendored code.
For example, terraform 0.12 moves the terraform state to version 4, compared to version 3. With this change installer can assume the terraform state
deserialized for use will always be version 4, as it will be upconverted by vendored terraform statefile package.
pkg/terraform: add gather package to store platform specific code from terraform
This adds bootstrap and control plane hosts ip gather from state file for platforms.
cmd/openshift-install: update gather code to utilize new terraform packages
/cc @wking @jstuever