2023-05-23 12:50:26 +02:00
|
|
|
pg_user := "terraform"
|
|
|
|
# pg_host := "pg.monotremata.xyz"
|
|
|
|
pg_host := "narwhal"
|
|
|
|
pg_db := "terraform_backend"
|
|
|
|
pg_port := "5432"
|
|
|
|
|
|
|
|
passwd := `pass pg.monotremata.xyz/terraform`
|
|
|
|
# todo: I'll use this once string interpolation gets implenented in Just https://github.com/casey/just/issues/11
|
|
|
|
# conn_str := f"postgres://{{pg_user}}:{{passwd}}@{{pg_host}}:{{pg_port}}/{{pg_db}}"
|
|
|
|
|
|
|
|
export NAMECHEAP_API_KEY := `pass namecheap.com/api_key`
|
|
|
|
export LINODE_TOKEN := `pass linode.com/token`
|
|
|
|
export VULTR_API_KEY := `pass vultr.com/api_key`
|
|
|
|
export HTTP_PROXY := "caladan:8888"
|
|
|
|
export HTTPS_PROXY := "caladan:8888"
|
2023-05-25 12:50:26 +02:00
|
|
|
export HETZNER_DNS_API_TOKEN := `pass hetzner.com/tokens/terraform`
|
2023-05-23 12:50:26 +02:00
|
|
|
|
|
|
|
init:
|
|
|
|
terraform init -backend-config="conn_str=postgres://{{pg_user}}:{{passwd}}@{{pg_host}}:{{pg_port}}/{{pg_db}}"
|
|
|
|
|
|
|
|
|
|
|
|
plan *ARGS:
|
|
|
|
terraform plan {{ARGS}}
|
|
|
|
|
|
|
|
apply *ARGS:
|
|
|
|
terraform apply {{ARGS}}
|
|
|
|
|
2023-05-25 12:50:26 +02:00
|
|
|
terraform *ARGS:
|
|
|
|
terraform {{ARGS}}
|