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

Default terraform refresh before terraform show #17478

Open
AnthonyWC opened this issue Mar 1, 2018 · 2 comments
Open

Default terraform refresh before terraform show #17478

AnthonyWC opened this issue Mar 1, 2018 · 2 comments

Comments

@AnthonyWC
Copy link

Currently doing a terraform show does not implicitly do a terraform refresh; unlike the behavior of terraform plan. Perhaps it's better to change the implicit behavior and to provide an option to not refresh instead (something simple like terraform show --no-fresh)?

Maybe there are good design reasons for this; if so would like to know why.

Terraform Version

Terraform v0.11.3

@tombuildsstuff
Copy link
Member

hey @AnthonyWC

Thanks for opening this issue

Given this is a Core question, one of the Core developers (@apparentlymart / @jbardin) should be able to explain the design choices here :)

Thanks!

@apparentlymart
Copy link
Member

Hi @AnthonyWC,

terraform show is intended mainly as a debugging command to quickly view what's in the state. We've since added the terraform state family of commands to group commands of this type, but terraform show predated that and so remains as a top-level command.

We're planning to spend some time improving and adjusting the CLI workflows once we've finished our current work on improving the configuration language, so I'm going to label this to remind us to look more closely at this once we get there, and see how it fits in with other enhancements to the CLI flow.

We'd need to approach a change here with care because it would cause terraform show to start requiring fully-complete provider configurations and credentials, whereas today it requires only an initialized backend and backend credentials; we need to take into account users who may be using this command in other ways and make sure there's an upgrade path for them. That'll be safer to do as part of a related set of changes rather than in isolation here.

Thanks for this suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants