Created
May 27, 2024 07:55
-
-
Save janosmiko/781f77db12a4cb1eee49aa17fa4919d8 to your computer and use it in GitHub Desktop.
Terraform output only show name and change type without diffs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform plan -out tfplan | |
terraform show -json tfplan | jq -r '.resource_changes[] | select (.change.actions | inside(["create","update","delete"])) | [ .address, ( .change.actions | join(" ")) ] | @csv' | sed -e "s/delete\screate/replace/g" -e "s/create\sdelete/replace/g" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment