Commit d1d459e1 authored by Fábio Matavelli's avatar Fábio Matavelli Committed by Fábio Matavelli

output plan to json file

parent 86b82a8c
......@@ -35,11 +35,15 @@ validate:
plan:
stage: build
script:
- apk update && apk add jq
- terraform plan -out=$PLAN
- "terraform show --json $PLAN | jq '([.resource_changes[].change.actions] | flatten) | {\"create\": (map(select(. == \"create\")) | length),\"update\":(map(select(. == \"update\")) | length),\"delete\": (map(select(. == \"delete\")) | length)}' > tfplan.json"
artifacts:
name: plan
paths:
- $PLAN
reports:
terraform: tfplan.json
# Separate apply job for manual launching Terraform as it can be destructive
# action.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment