-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
terraform plan -refresh=true vs. terraform plan -refresh=false #17311
Comments
Hi @boldandbusted, If I understand the issue here correctly, you are expecting to always see the interpolation strings rather than the actual data they represent? The latter output without refresh only shows the Upcoming changes to the output may provide a better diff layout overall, but if the provider is returning a string for the change in the data, the object is to display that change to the user. |
Hi @jbardin. Actually, what I'm seeing is the opposite: I get more information (the data.* resources) when I don't run the refresh run during a plan (i.e. -refresh=false). I'm fine with seeing the interpolation only in the resources, but I miss the data.* resources. I probably should have made that clearer by including the data.* resource outputs. I hope I can put up a better example later today or tomorrow, if that's needed. |
Hi @boldandbusted! If I'm understanding correctly, you're wondering why the Terraform tries to read data resources as early as possible. If the configuration does not depend on anything that is However, I've also thought before that it can sometimes be helpful to see the result of the data resource read even if it was dealt with during the refresh phase, since it can help to understand other downstream changes. Over in #17034 I wrote up some other sub-optimal aspects of how data resources are handled, and while this particular behavior is not covered there it has come up in some prototyping I did of our diff rendering, which I'll spend some more time on once we complete our current major project of integrating an improved configuration language parser. In this particular scenario I think you wanted to see the Given our current focus on the configuration language work we won't be able to make any immediate changes here, but I'm going to tag this so we'll remember to look back at it once we shift our focus onto improvements to the primary CLI workflow and UX. |
I don't know if this is a local issue, but I see dramatic differences in the plan output when I pass '-refresh=false' to terraform plan, rather than the default '-refresh=true'.
Example, with -refresh=true (the default):
vs.
and, I see data.* resources (used in the policies above) nicely broken out tabularly with '-refresh=false', but they are not shown when '-refresh=true', with " <= data.aws_iam_policy_document.logs_s3-write-only [...]"
This is a cosmetic bug, but would be helpful to see the output nicely parsed and presented without disabling refresh. Thanks! Happy to provide more context.
The text was updated successfully, but these errors were encountered: