You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an enhancement for the hide_refresh option. As explained in this article, running terraform refresh can be dangerous, as it will automatically update the state file. Some credentials misconfiguration for example can misled terraform to think that the resources do not exist, thereby emptying the state file.
I would suggest to just remove Refreshing... or Reading... lines from terraform plan outputs instead of performing terraform refresh. Here's an example taken from this issue:
terraform plan | grep -v "Refreshing state...\|Reading...\|Read complete after"
The text was updated successfully, but these errors were encountered:
It is a bit different than terraform refresh in that the state refreshing is done in-memory, and will only be applied to the state file when terraform apply is carried on. This is unlike terraform refresh where the state file will always be updated.
I see, the docs for terraform plan is annoyingly vague about this 😓
Thank you for the suggestion!
Do you want to open a PR for this? I can do it if you're busy with something else.
This is an enhancement for the hide_refresh option. As explained in this article, running terraform refresh can be dangerous, as it will automatically update the state file. Some credentials misconfiguration for example can misled terraform to think that the resources do not exist, thereby emptying the state file.
I would suggest to just remove
Refreshing...
orReading...
lines from terraform plan outputs instead of performing terraform refresh. Here's an example taken from this issue:The text was updated successfully, but these errors were encountered: