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 init -reconfigure flag #13825

Merged
merged 3 commits into from Apr 21, 2017
Merged

add init -reconfigure flag #13825

merged 3 commits into from Apr 21, 2017

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Apr 20, 2017

The reconfigure flag will force init to ignore any saved backend state.
This is useful when a user does not want any backend migration to
happen, or if the saved configuration can't be loaded at all for some
reason.

Copy link
Member

@apparentlymart apparentlymart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable to me.

I feel a little ambivalent about the name reconfigure since it doesn't connote for me the idea of ignoring the existing config and starting over, but I can't think of a better verb here. 🤷‍♂️

command/init.go Outdated
-force-copy Suppress prompts about copying state data. This is
equivalent to providing a "yes" to all confirmation
prompts.
-reconfigre Reconfigure the backend, ignoring any saved configuration.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo in the option name here

@@ -60,8 +63,7 @@ The command-line flags are all optional. The list of available flags are:

* `-no-color` - If specified, output won't contain any color.

* `-force-copy` - Suppress prompts about copying state data. This is equivalent
to providing a "yes" to all confirmation prompts.
* `-reconfigre` - Reconfigure the backend, ignoring any saved configuration.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also typo here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'm an expert at cut&paste errors ;)

@jbardin
Copy link
Member Author

jbardin commented Apr 20, 2017

It is in essence "reconfiguring" since it currently acts as if the user removed .terraform/terraform.tfstate before running init (though it's possible in the future that other info in that "state" file could be used).

I also can't think of a better name, maybe -reconfigure-backend, though that seems a little long?

The reconfigure flag will force init to ignore any saved backend state.
This is useful when a user does not want any backend migration to
happen, or if the saved configuration can't be loaded at all for some
reason.
Check that we can reconfigure a backend ignoring the saved config, and
without effecting the saved backend.
add -reconfigure, and fix ordering of the other flags
@apparentlymart
Copy link
Member

After mulling this some more the only other idea I came up with was the rather-more-literal -ignore-existing-backend, which is also quite long. But perhaps this should be long because it's something that should rarely be used?

I don't feel strongly about the name, anyway. If you're happy with -reconfigure then feel free to ignore me. 😀

@jbardin
Copy link
Member Author

jbardin commented Apr 21, 2017

Yeah, I didn't want to put "force" or "ignore" in there, because I was sort of leaving this open for adding some sanity checks if they become required, which means we might load the saved config, or add arguments to the -reconfigure flag.

@jbardin jbardin merged commit dca8951 into master Apr 21, 2017
@jbardin jbardin deleted the jbardin/reconfigure branch April 21, 2017 13:03
@ghost
Copy link

ghost commented Apr 13, 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.

@hashicorp hashicorp locked and limited conversation to collaborators Apr 13, 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.

None yet

2 participants