2024-02-10 09:40:04 +00:00
|
|
|
env := production
|
2024-04-27 12:29:38 +00:00
|
|
|
command ?= apply -auto-approve
|
2024-02-10 09:40:04 +00:00
|
|
|
|
|
|
|
deploy_vault:
|
|
|
|
ifneq (,$(wildcard ~/vaultUnseal/$(env)/rootkey))
|
2024-04-27 12:29:38 +00:00
|
|
|
VAULT_TOKEN=$(shell cat ~/vaultUnseal/$(env)/rootkey) terraform -chdir=vault $(command)
|
2024-02-10 09:40:04 +00:00
|
|
|
else
|
2024-04-27 12:29:38 +00:00
|
|
|
terraform -chdir=vault $(command)
|
2024-02-10 09:40:04 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
deploy_dns:
|
2024-04-27 12:29:38 +00:00
|
|
|
TF_VAR_powerDnsApiKey=$(shell vault kv get -field=API_KEY secrets/nomad/pdns) TF_VAR_hetznerApiKey=$(shell vault kv get -field=hdns_token secrets/hetzner) terraform -chdir=dns $(command)
|
2024-02-10 09:40:04 +00:00
|
|
|
|
|
|
|
deploy_cloud:
|
2024-04-27 12:29:38 +00:00
|
|
|
TF_VAR_hetznerApiKey=$(shell vault kv get -field=hdns_token secrets/hetzner) terraform -chdir=cloud $(command)
|
2024-02-10 09:40:04 +00:00
|
|
|
|