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
f1d097a01a
commit
70823bb3ed
10 changed files with 37 additions and 20 deletions
7
scripts/terraform/plan.sh
Normal file
7
scripts/terraform/plan.sh
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
#%%MULTILINE_YAML_START
|
||||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue