Skip to content

Instantly share code, notes, and snippets.

@janosmiko
Created May 27, 2024 07:55
Show Gist options
  • Save janosmiko/781f77db12a4cb1eee49aa17fa4919d8 to your computer and use it in GitHub Desktop.
Save janosmiko/781f77db12a4cb1eee49aa17fa4919d8 to your computer and use it in GitHub Desktop.
Terraform output only show name and change type without diffs
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