This commit is contained in:
2024-06-29 07:43:46 -05:00
parent 806bfe7ae5
commit cc54a82cee
6 changed files with 7 additions and 7 deletions

View File

@@ -3,5 +3,5 @@
#Terraform plan
apk add --update curl jq
alias convert_report="jq -r '([.resource_changes[].change.actions?]|flatten)|{\"create\":(map(select(.==\"create\"))|length),\"update\":(map(select(.==\"update\"))|length),\"delete\":(map(select(.==\"delete\"))|length)}'"
terraform plan -out=$PLAN $ARGUMENTS
terraform show --json $PLAN | convert_report > $JSON_PLAN_FILE
tofu plan -out=$PLAN $ARGUMENTS
tofu show --json $PLAN | convert_report > $JSON_PLAN_FILE