Move split secrets into single env file

Separating state secrets and others made life a pain. Just do everything in an env file instead, which makes syncing a lot simpler
This commit is contained in:
Jake Howard 2023-05-03 20:40:10 +01:00
parent 61072ddeab
commit c354085dfc
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 7 additions and 6 deletions

3
.gitignore vendored
View file

@ -150,5 +150,4 @@ override.tf.json
# End of https://www.gitignore.io/api/terraform
terraform/secrets.auto.tfvars
terraform/secrets.sh
.env

View file

@ -1,9 +1,12 @@
#!/usr/bin/env bash
set -ex
set -e
cd terraform/
source secrets.sh || true
# Load secrets from env file (if it exists)
set -a
source ./.env || true
set +a -x
terraform $@

View file

@ -4,5 +4,4 @@ set -ex
cd terraform/
bw get attachment secrets.sh --itemid c4f8b44e-ae62-442d-a9e0-02d0621c2454
bw get attachment secrets.auto.tfvars --itemid c4f8b44e-ae62-442d-a9e0-02d0621c2454
bw get attachment .env --itemid c4f8b44e-ae62-442d-a9e0-02d0621c2454