ordo: improve makefile for terraform
This commit is contained in:
parent
2632c6d2b0
commit
c8f7d7f8c3
2
makefile
2
makefile
@ -15,7 +15,7 @@ vagranup:
|
||||
|
||||
create-dev: vagranup DNS-stagging
|
||||
make -C ansible deploy_staging
|
||||
make -C terraform deploy_vault
|
||||
make -C terraform deploy_vault env=stagging
|
||||
|
||||
create-dev-base: vagranup DNS-stagging
|
||||
make -C ansible deploy_staging_base
|
||||
|
15
terraform/makefile
Normal file
15
terraform/makefile
Normal file
@ -0,0 +1,15 @@
|
||||
env := production
|
||||
|
||||
deploy_vault:
|
||||
ifneq (,$(wildcard ~/vaultUnseal/$(env)/rootkey))
|
||||
VAULT_TOKEN=$(shell cat ~/vaultUnseal/$(env)/rootkey) terraform -chdir=vault apply
|
||||
else
|
||||
terraform -chdir=vault apply
|
||||
endif
|
||||
|
||||
deploy_dns:
|
||||
TF_VAR_powerDnsApiKey=$(shell vault kv get -field=API_KEY secrets/nomad/pdns) TF_VAR_hcloud_token=$(vault kv get -field=hcloud_token secrets/hetzner) terraform -chdir dns apply
|
||||
|
||||
deploy_cloud:
|
||||
TF_VAR_hetznerApiKey=$(shell vault kv get -field=hdns_token secrets/hetzner) terraform -chdir=cloud apply
|
||||
|
Loading…
Reference in New Issue
Block a user