-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support atlantis refresh
subcommand
#2849
Comments
I believe that the
|
Do you have a reference explaining that the refresh command is unsafe?
Yes, id personally like it.
Yes this is true. However, then you get a more complex plan to review. The refresh reduces the plan to the main resources that are changing. |
It's mentioned in the documentation here: https://developer.hashicorp.com/terraform/cli/commands/refresh, I don't think that the warning should apply to Atlantis, as I expect that this more related to local development. Anyhow, I would like to pick this up in the case that we still want this feature. |
Ah thank you for sharing that link. I did not know it was deprecated. https://developer.hashicorp.com/terraform/tutorials/state/refresh
Then perhaps the workaround i included above is the best way forward. |
The downside of not implementing This is the issue with the current workaround. The ideal method would be that you could run |
terraform refresh
subcommandrefresh
subcommand
refresh
subcommandatlantis refresh
subcommand
Yes, refresh is a feature that TFC also supports, it just changes the way the command is executed.
Either way, it would be nice to be able to sync the tfstate file in atlantis. |
Another option is to have atlantis detect the refresh, split it into 2 separate sections, and print. This ways it's obvious to the user what is going to change resources and what is going to refresh the state. It's not an outdated issue. It's a still relevant issue that happens to be old. 😄 |
Community Note
Describe the user story
For terraform 0.15.4 and later, sometimes the attributes of managed resources are modified. When a
terraform plan
is run, we get a lot of information that frankly no one cares about and then finally the plan is appended beneath it.In order to remove the text above the
plan
we have to run aterraform refresh
.This can be added to the
plan
workflow but I do not want to run it all the time since it's more calls to AWS than we need.Ref https://support.hashicorp.com/hc/en-us/articles/4405950960147-New-Feature-Objects-have-changed-outside-of-Terraform-
Example of the "junk" with the
no changes
messageDescribe the solution you'd like
It would be best to have an option to run it like this.
or
Related to this issue #2776
Describe the drawbacks of your solution
None
Describe alternatives you've considered
Run a refresh-only plan first
or
Run
terraform refresh
locally and then runatlantis plan
in the PR.The text was updated successfully, but these errors were encountered: