simple initial boilerplate

main
Ricard Illa 2022-08-18 18:15:21 +02:00
parent ce97725c4d
commit 173fb843c7
No known key found for this signature in database
GPG Key ID: F69A672B72E54902
3 changed files with 20 additions and 0 deletions

11
init.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
PG_USER=terraform
PG_HOST=pg.monotremata.xyz
PG_DB=terraform_backend
PG_PORT=5432
passwd=$(pass "${PG_HOST}/${PG_USER}")
conn_str="postgres://${PG_USER}:${passwd}@${PG_HOST}:${PG_PORT}/${PG_DB}"
terraform init -backend-config="conn_str=${conn_str}"

3
main.tf Normal file
View File

@ -0,0 +1,3 @@
terraform {
backend "pg" {}
}

6
run_terraform Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
export HTTP_PROXY=caladan:8888
export HTTPS_PROXY=caladan:8888
terraform "$@"