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

Don't ForceLocal for the import backend #15768

Merged
merged 3 commits into from
Aug 11, 2017
Merged

Don't ForceLocal for the import backend #15768

merged 3 commits into from
Aug 11, 2017

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Aug 9, 2017

While the local.Local backend is the only implementation of
backend.Local, creating the backend with ForceLocal bypasses the
backend.Backend in the local.Local causing a local state to be
implicitly created rather than using the configured state backend.

Add a test that imports into a configured backend (using the "local"
backend as a remote state proxy). This further confirms the confusing
nature of ForceLocal, as the backend is local, but not from the
viewpoint of meta.Backend.

Fixes #15735

TODO: It's becoming clear there needs to be some helpers for test fixture initialization in the command package.

While the `local.Local` backend is the only implementation of
`backend.Local`, creating the backend with `ForceLocal` bypasses the
`backend.Backend` in the `local.Local` causing a local state to be
implicitly created rather than using the configured state backend.

Add a test that imports into a configured backend (using the "local"
backend as a remote state proxy). This further confirms the confusing
nature of ForceLocal, as the backend _is_ local, but not from the
viewpoint of meta.Backend.
@jbardin jbardin added the bug label Aug 9, 2017
@jbardin jbardin requested a review from apparentlymart August 9, 2017 14:29
jbardin added 2 commits August 9, 2017 14:01
Fix the -state and -state-out wording to be consistent with other
commands. Remove the erroneous reference to remote state in the website
version of the flag description.
@jbardin jbardin merged commit ea3e87b into master Aug 11, 2017
@jbardin jbardin deleted the jbardin/remote-import branch August 11, 2017 13:12
@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.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

terraform import ignores remote state and creates a new local state file
2 participants