Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 856 Bytes

validating_locally.md

File metadata and controls

22 lines (17 loc) · 856 Bytes

Validating terraform plan locally (work in progress)

export TF_STACK=$(pwd)
mkdir tmp/
cd tmp/

# set env vars from pipeline as `export key=value` for plan parameters
eval "$(fly -t fr get-pipeline -p terraform-provision -j | jq -r '.| .jobs[] | select(.name=="plan-bootstrap-tooling") | .plan[1].params | to_entries[] | "export " + .key + "=" + .value')"

# export your AWS vars, then run:
/your/path/to/cg-pipeline-tasks/terraform-apply.sh

# clean up:
cd .. & rm -rf tmp/