From b7e4e8bb145215f992a5dceaf676c105f6296452 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 10 Aug 2020 14:35:42 -0300 Subject: Interactive Terraform plan -> apply cycle --- terraform-update.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'terraform-update.sh') diff --git a/terraform-update.sh b/terraform-update.sh index 436d7a1..ac2b9ca 100755 --- a/terraform-update.sh +++ b/terraform-update.sh @@ -4,10 +4,9 @@ set -Eeuo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" -git crypt unlock -direnv allow - terraform init PLAN_FILE="./secrets/terraform/plan-files/$(date -Iseconds)" -terraform plan -input=false -out="${PLAN_FILE}" -terraform apply -input=false "${PLAN_FILE}" +terraform plan -out="${PLAN_FILE}" +# shellcheck disable=2162 +read -p "Is the above Terraform plan acceptable?." +terraform apply "${PLAN_FILE}" -- cgit v1.2.3