diff options
author | EuAndreh <eu@euandre.org> | 2020-08-10 12:15:49 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-08-10 12:45:43 -0300 |
commit | 100ab568e3aeb512e86fd1155a73454d22e24895 (patch) | |
tree | 1d7ff9168b8cfc60e173f2a19f30938bc68d0f6e /terraform-update.sh | |
parent | WIP: Move to Vultr and NixOS (diff) | |
download | server-100ab568e3aeb512e86fd1155a73454d22e24895.tar.gz server-100ab568e3aeb512e86fd1155a73454d22e24895.tar.xz |
Migration: Remove Ansible and Docker code, move only to NixOS
Diffstat (limited to 'terraform-update.sh')
-rwxr-xr-x | terraform-update.sh | 13 |
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}" |