-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[terraform] add init options -reconfigure and -migrate-state #923
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Code changes LGTM except for some tiny NITs. Once those are resolved, I can kick off tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you! I'll kick off tests now.
Precommit check failed:
Please run |
…estInitBackendMigration Signed-off-by: Nick Metz <[email protected]>
56518e6
to
45f0a7e
Compare
Sorry, missed that step in contribution guidelines. Please run tests again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I'll kick off tests again!
Looks like there were some relevant test failures:
And:
|
…estInitBackendMigration Signed-off-by: Nick Metz <[email protected]>
This is related to terraform version used for the test, in version v0.15.0 backend re-initialization was accepted without -migrate-state or -reconfigure. In the meantime the version was updated to v0.15.5 with new behavior e4f4b36 . Rebase done, test should use now v0.15.5. |
Hey @yorinasub17, could you please also review this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. We are doing a virtual company offsite this week, so it's been quite busy. Updates LGTM, I'll re-run the tests now.
There were some intermittent test failures, but I think they were unrelated to this PR, so I'm going to merge. Thanks! |
As mentioned in #839 it's may a good idea to have terraform init options
-reconfigure
and-migrate-state
configurable.This PR will add:
Reconfigure
andMigrateState
-force-copy
to suppress the prompt for confirmation (similar to-auto-approve
)TestInitReconfigureBackend
andTestInitBackendMigration
InitE
func due to the fact this options only used by terraform init and do not require any parameters which would require specific formattingReference to terraform documentation:
https://www.terraform.io/docs/cli/commands/init.html#backend-initialization