"Changed outside of Terraform" and terraform plan readability in general

Sorry to open yet another topic on this but I couldn’t find a recent discussion about the output feature/bug since 0.15.4.

I would like to know what is the current status and opinion from terraform folks about the state of the terraform plan output today? Is there any additional plans and option discussed?

These are the topics I could gather on the subject:

What I think is generally being asked is to be able to have an opt-in option to hide the part:

Note: Objects have changed outside of Terraform

I’m not sure I understood what came out of issue 30486.

Being straight to the point, I would prefer if it was possible to have output the same way as if I did:

terraform plan | grep -v 'Refreshing state' | grep -v '^ *$' | grep -A 5000 'Terraform will perform the following actions\|No changes'

This means 3 options:

  • print_refresh_statements: to print the “Refreshing state”
  • print_compact: avoid empty lines
  • print_outside_change: to print the out of state detected drift

Any opinion?

Hi @Fran-Rg,

In the meantime since the original change Terraform now behaves differently than in the original implementation: it will show “Objects have changed outside of Terraform” only if there’s a planned change that seems like it might have been caused by the change made outside of Terraform, and therefore the change outside of Terraform is potentially relevant.

If you are seeing this message for changes that are irrelevant – that is, what’s being described as changed outside of Terraform has nothing to do with the changes Terraform is proposing to make – then it would help to see an example so we can think about ways to refine that rule further.

If your request is to never see that message even when the change made outside of Terraform is relevant to the changes being proposed then that is different and probably best discussed directly with our product manager in a synchronous call so we can get some more nuance about the requirement.

At this time our goal is to improve Terraform’s heuristics for deciding whether to show it, and so we currently have no intention to offer any direct option to disable it, but of course new information can always prompt revisiting old decisions. If you’d like to discuss this further with the product manager please let me know and I can pass on that request. Thanks!

Heya, thanks for the clarification. Yeah I think I understand now the change. While changing what happens in the “engine” part of terraform is great, the “UI” is what 99% of us deal with.

I would love to get my 3 points above passed to a product manager:

  • print_refresh_statements: to print the “Refreshing state”
  • print_compact: avoid empty lines
  • print_outside_change: to print the out of state detected drift

There’s definitely room for better name convention.

My view is that terraform generate a very verbosy data. The more we can shrink, the easier the engineers can review. In a comparison, it’s easier to review a 280 character (a tweet) message than a 5000 character message.
This would avoid mistake where we didn’t see a very important change was going to happen because we got overloaded with other information