Makefile: remove hardcoded environment
This commit is contained in:
parent
048f29c9f1
commit
09e7c060b8
6
Makefile
6
Makefile
|
@ -62,7 +62,7 @@ infra/backend/$(ENVIRONMENT).tfstate: \
|
||||||
$(OUT_DIR)/terraform \
|
$(OUT_DIR)/terraform \
|
||||||
$(OUT_DIR)/sops \
|
$(OUT_DIR)/sops \
|
||||||
infra/backend/.terraform
|
infra/backend/.terraform
|
||||||
$(SOPS) exec-env secrets/production.enc.env '\
|
$(SOPS) exec-env secrets/$(ENVIRONMENT).enc.env '\
|
||||||
env -C infra/backend \
|
env -C infra/backend \
|
||||||
$(TERRAFORM) apply \
|
$(TERRAFORM) apply \
|
||||||
-var environment=$(ENVIRONMENT) \
|
-var environment=$(ENVIRONMENT) \
|
||||||
|
@ -76,7 +76,7 @@ config/$(ENVIRONMENT).tfbackend: | \
|
||||||
$(OUT_DIR)/sops \
|
$(OUT_DIR)/sops \
|
||||||
# File is not committed and this has no shared state
|
# File is not committed and this has no shared state
|
||||||
$(MAKE) infra/backend/$(ENVIRONMENT).tfstate
|
$(MAKE) infra/backend/$(ENVIRONMENT).tfstate
|
||||||
$(SOPS) exec-env secrets/production.enc.env '\
|
$(SOPS) exec-env secrets/$(ENVIRONMENT).enc.env '\
|
||||||
env -C infra/backend \
|
env -C infra/backend \
|
||||||
$(TERRAFORM) \
|
$(TERRAFORM) \
|
||||||
output -state ../../$< \
|
output -state ../../$< \
|
||||||
|
@ -88,7 +88,7 @@ apply: \
|
||||||
$(OUT_DIR)/terraform \
|
$(OUT_DIR)/terraform \
|
||||||
$(OUT_DIR)/sops \
|
$(OUT_DIR)/sops \
|
||||||
infra/main/.terraform
|
infra/main/.terraform
|
||||||
$(SOPS) exec-env secrets/production.enc.env '\
|
$(SOPS) exec-env secrets/$(ENVIRONMENT).enc.env '\
|
||||||
env -C infra/main \
|
env -C infra/main \
|
||||||
$(TERRAFORM) apply \
|
$(TERRAFORM) apply \
|
||||||
-var environment=$(ENVIRONMENT) \
|
-var environment=$(ENVIRONMENT) \
|
||||||
|
|
Loading…
Reference in New Issue