diff --git a/database-grants/terraform/README.md b/database-grants/terraform/README.md new file mode 100644 index 0000000..313ab3f --- /dev/null +++ b/database-grants/terraform/README.md @@ -0,0 +1,38 @@ +# How to set up terraform + +Find your digitalocean spaces access key and secret key here: https://cloud.digitalocean.com/account/api/spaces?i=d79377 + +Save it to your local `~/.netrc` file: + +```bash +echo "machine sfo2.digitaloceanspaces.com login $SPACES_KEY password $SPACES_SECRET" >> ~/.netrc +``` + +Go the env folder, load key + +```bash +cd dev +source setup_keys.sh +``` + +# How to run terraform + +Init: + +```bash +terraform init -backend-config=backend-config.tfvars +``` + +Plan, in the prompt input the database password: + +```bash +terraform plan -var-file=dev.env.tfvars +``` + +Apply: + +```bash +terraform apply -var-file=dev.env.tfvars +``` + + diff --git a/database-grants/terraform/dev/setup_keys.sh b/database-grants/terraform/dev/setup_keys.sh old mode 100644 new mode 100755 diff --git a/database-grants/terraform/prod/backend.tf b/database-grants/terraform/prod/backend.tf index c857125..2bc7a4d 100644 --- a/database-grants/terraform/prod/backend.tf +++ b/database-grants/terraform/prod/backend.tf @@ -10,7 +10,7 @@ terraform { # Deactivate a few checks as TF will attempt these against AWS skip_credentials_validation = true # skip_get_ec2_platforms = true - # skip_requesting_account_id = true + skip_requesting_account_id = true skip_metadata_api_check = true } }