Is it possible with some command line option to show a pretty line-by-line diff if for example the policy
attribute of an aws_iam_role_policy
resource changes? terraform currently just treats this as text and shows me the old string and the new string all in one line with \n
etc. which makes it quite hard to read. Would you consider adding such a feature?
+1
I would love to see this enhancement. Currently, I copy/paste into a text editor where I do some manual cleanup via regex and then feed it into a JSON diff program. It is cumbersome to say the least. Having improved visual diffs directly on the command line as part of normal output would be a huge improvement.
+1
Until first-class support is included in Terraform, there is an open source project terraform-landscape that expands JSON attributes and other multiline attributes to be easier to read.
@sds this works perfectly and is exactly what I head in mind. Would be a huge improvement to integrate such functionality into terraform!
To add some context, there are people at my company actively choosing alternatives to terraform explicitly because the change output is difficult to read: sighting JSON in specific examples. This enhancement would be a very strong addition to making terraform more palatable.
Honestly, landscape is so good, it ought to be pulled into terraform master. Impressive work!
While I love the output from landscape (seriously its amazing), I need to install a ruby interpreter into some of our CI tooling which breaks my heart a little bit :(
Hi everyone! Sorry for the long silence here.
We're discussing diff rendering problems over in #15180, so I'm going to close this one just to consolidate the discussion over there. Sorry I missed this one when I did the initial pass of consolidation.
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Until first-class support is included in Terraform, there is an open source project terraform-landscape that expands JSON attributes and other multiline attributes to be easier to read.