aboutsummaryrefslogtreecommitdiff
path: root/terraform-update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'terraform-update.sh')
-rwxr-xr-xterraform-update.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/terraform-update.sh b/terraform-update.sh
new file mode 100755
index 0000000..436d7a1
--- /dev/null
+++ b/terraform-update.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash
+# shellcheck shell=bash
+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}"