Skip to content

Commit

Permalink
Merge pull request #349 from ustaxcourt/output-tf-plan
Browse files Browse the repository at this point in the history
Output terraform plans before applying them.
  • Loading branch information
adunkman authored Aug 13, 2020
2 parents 7cab0b9 + 99c450b commit a40d775
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
12 changes: 11 additions & 1 deletion web-api/terraform/bin/deploy-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,15 @@ popd
# exit on any failure
set -eo pipefail

export TF_VAR_dns_domain=$EFCMS_DOMAIN
export TF_VAR_zone_name=$ZONE_NAME
export TF_VAR_environment=$ENVIRONMENT
export TF_VAR_cognito_suffix=$COGNITO_SUFFIX
export TF_VAR_ses_dmarc_rua=$SES_DMARC_EMAIL
export TF_VAR_es_instance_count=$ES_INSTANCE_COUNT
export TF_VAR_honeybadger_key=$CIRCLE_HONEYBADGER_API_KEY
export TF_VAR_irs_superuser_email=$IRS_SUPERUSER_EMAIL

terraform init -backend=true -backend-config=bucket="${BUCKET}" -backend-config=key="${KEY}" -backend-config=dynamodb_table="${LOCK_TABLE}" -backend-config=region="${REGION}"
terraform apply -auto-approve -var "dns_domain=${EFCMS_DOMAIN}" -var "zone_name=${ZONE_NAME}" -var "environment=${ENVIRONMENT}" -var "cognito_suffix=${COGNITO_SUFFIX}" -var "ses_dmarc_rua=${SES_DMARC_EMAIL}" -var "es_instance_count=${ES_INSTANCE_COUNT}" -var "honeybadger_key=${CIRCLE_HONEYBADGER_API_KEY}" -var "irs_superuser_email=${IRS_SUPERUSER_EMAIL}"
terraform plan
terraform apply -auto-approve
12 changes: 11 additions & 1 deletion web-client/terraform/bin/deploy-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,15 @@ then
IS_DYNAMSOFT_ENABLED="1"
fi


export TF_VAR_zone_name=$ZONE_NAME
export TF_VAR_dns_domain=$EFCMS_DOMAIN
export TF_VAR_environment=$ENVIRONMENT
export TF_VAR_dynamsoft_url=$DYNAMSOFT_URL
export TF_VAR_dynamsoft_product_keys=$DYNAMSOFT_PRODUCT_KEYS
export TF_VAR_dynamsoft_s3_zip_path=$DYNAMSOFT_S3_ZIP_PATH
export TF_VAR_is_dynamsoft_enabled=$IS_DYNAMSOFT_ENABLED

terraform init -backend=true -backend-config=bucket="${BUCKET}" -backend-config=key="${KEY}" -backend-config=dynamodb_table="${LOCK_TABLE}" -backend-config=region="${REGION}"
terraform apply --auto-approve -var "zone_name=${ZONE_NAME}" -var "dns_domain=${EFCMS_DOMAIN}" -var "environment=${ENVIRONMENT}" -var "dynamsoft_url=${DYNAMSOFT_URL}" -var "dynamsoft_product_keys=${DYNAMSOFT_PRODUCT_KEYS}" -var "dynamsoft_s3_zip_path=${DYNAMSOFT_S3_ZIP_PATH}" -var "is_dynamsoft_enabled=${IS_DYNAMSOFT_ENABLED}"
terraform plan
terraform apply --auto-approve

0 comments on commit a40d775

Please sign in to comment.