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

terraform state commands ignore the -state flag #15388

Merged
merged 3 commits into from
Jun 23, 2017

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Jun 23, 2017

The state commands were always loading a state from a Backend, and ignoring the -state flag.

The docs for the -backup flag also didn't match the current behavior, which was passing tests by accident. Update the docs to reflect that one and only one backup will be created, and reevaluate the multiple backup behavior later.

Fixes #15359

If we provide a -state flag to a state command, we do not want terraform
to modify the backend state. This test fails since the state specified
in the backend doesn't exist
When using a `state` command, if the `-state` flag is provided we do not
want to modify the Backend state. In this case we should always create a
local state instance.

The backup flag was also being ignored, and some tests were relying on
that, which have been fixed.
There is only one backup made, contrary to the help text. We may want to
implement that, but the documentation should match the current behavior.
@jbardin jbardin merged commit 61b96f0 into master Jun 23, 2017
@jbardin jbardin deleted the jbardin/state-mv-backend branch September 7, 2017 15:11
@ghost
Copy link

ghost commented Apr 7, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

terraform state rm ignores -state=... option
2 participants