mirror of
https://gitlab.durp.info/durfy/ci-includes/yml.git
synced 2026-05-07 07:50:30 -05:00
update
This commit is contained in:
parent
bf5417aa4c
commit
719018e0d6
1 changed files with 2 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#%%MULTILINE_YAML_START
|
#%%MULTILINE_YAML_START
|
||||||
#Terraform plan
|
#Terraform plan
|
||||||
apk add --update curl jq
|
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)}'"
|
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)}'"
|
||||||
tofu plan -out=$PLAN $ARGUMENTS
|
tofu plan -out=$PLAN $ARGUMENTS
|
||||||
tofu show --json $PLAN | convert_report > $JSON_PLAN_FILE
|
tofu show --json $PLAN | jq -r '([.resource_changes[].change.actions?]|flatten)|{"create":(map(select(.=="create"))|length),"update":(map(select(.=="update"))|length),"delete":(map(select(.=="delete"))|length)}' > $JSON_PLAN_FILE
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue