Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can terraform plan show me a json diff for a changed resource?

Tags:

terraform

When I run terraform plan it shows a changed resource, which happens to be JSON data in an aws_s3_bucket_object. But the JSON is long and it's difficult to see what changed. How can I display this as a diff?

like image 784
mblakele Avatar asked Dec 08 '22 18:12

mblakele


1 Answers

https://github.com/coinbase/terraform-landscape can help with this.

  1. gem install terraform_landscape (may need sudo on macOS)
  2. terraform plan | landscape

This shows JSON changes as a diff. Here's an example from the github site:

enter image description here

like image 186
mblakele Avatar answered May 28 '23 13:05

mblakele