aboutsummaryrefslogtreecommitdiff
path: root/terraform-update.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-08-10 14:35:42 -0300
committerEuAndreh <eu@euandre.org>2020-08-10 14:38:39 -0300
commitb7e4e8bb145215f992a5dceaf676c105f6296452 (patch)
tree114facd62b960d2c6947664544208df759cef271 /terraform-update.sh
parentnixfmt ./secrets/nix/e1d5f317b0f7a-snapshot-configuration.nix (diff)
downloadtoph-b7e4e8bb145215f992a5dceaf676c105f6296452.tar.gz
toph-b7e4e8bb145215f992a5dceaf676c105f6296452.tar.xz
Interactive Terraform plan -> apply cycle
Diffstat (limited to 'terraform-update.sh')
-rwxr-xr-xterraform-update.sh9
1 files changed, 4 insertions, 5 deletions
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}"