Commit 2073d04a authored by Emily Ring's avatar Emily Ring Committed by Mayra Cabrera

Include tfplan.json in Terraform template artifact

parent 5ab86253
...@@ -12,6 +12,7 @@ image: ...@@ -12,6 +12,7 @@ image:
# Default output file for Terraform plan # Default output file for Terraform plan
variables: variables:
PLAN: plan.tfplan PLAN: plan.tfplan
JSON_PLAN_FILE: tfplan.json
cache: cache:
paths: paths:
...@@ -37,11 +38,13 @@ plan: ...@@ -37,11 +38,13 @@ plan:
stage: build stage: build
script: script:
- terraform plan -out=$PLAN - terraform plan -out=$PLAN
- "terraform show --json $PLAN | convert_report > tfplan.json" - "terraform show --json $PLAN | convert_report > $JSON_PLAN_FILE"
artifacts: artifacts:
name: plan name: plan
paths: paths:
- $PLAN - $PLAN
reports:
terraform: $JSON_PLAN_FILE
# Separate apply job for manual launching Terraform as it can be destructive # Separate apply job for manual launching Terraform as it can be destructive
# action. # 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