Summarize Terraform plan actions by resource
Build a paste-ready command, then review its compatibility and effects before running it.
terraform show -json <file> | jq -r '.resource_changes[] | [.address, (.change.actions | join(" -> "))] | @tsv'Complete required fields to copy the generated command.
read-onlyno known side effects Compatibility
Linux + macOS + WindowsVerified for Linux, macOS, Windows using bash, zsh, powershell syntax.
Operational knowledgereview due 2027-01-19
Requirementsterraformterraform must be installed and available on PATH.
Version supportterraform Current supported releasesVerified for linux, macos, windows using bash, zsh, powershell syntax; consult compatibility notes for platform-specific differences.
Expected signalsaws_ecs_service.api updateRepresentative successful output; values vary with the selected target and system state.
Known errorsterraform: command not foundterraform is missing or is not available on PATH.
Verifyterraform show -json {{file}} | jq -r '.resource_changes[] | [.address, (.change.actions | join(" -> "))] | @tsv'The output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01terraformCommandRuns the terraform stage of this one-liner.
02showArgumentPasses show to terraform.
03-jsonOptionConfigures terraform with the -json option.
04<file>ParameterA value supplied in the Fill parameters section.
05|PipelinePasses the output on the left to the command on the right.
06jqCommandRuns the jq stage of this one-liner.
07-rOptionEnables raw, recursive, or reverse mode for this command.
08'.resource_changes[] | [.address, (.change.actions | join(" -> "))] | @tsv'ArgumentPasses '.resource_changes[] | [.address, (.change.actions | join(" -> "))] | @tsv' to jq.
This advanced community-curated one-liner combines several stages. Review every option and placeholder before running it.
Example input
terraform show -json tfplan | jq -r '.resource_changes[] | [.address, (.change.actions | join(" -> "))] | @tsv'
Example output
aws_ecs_service.api update
aws_security_group_rule.https create
aws_cloudwatch_log_group.legacy delete
Illustrative output — exact values vary by system and data.
Official sources