generated from jamesrcounts/devcontainer-terraform-azure
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
29 lines (21 loc) · 846 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
default: plan
# There is only one module here.
module := workspaces/root
SECRETS := ./$(module)/terraform.secrets.auto.tfvars
$(SECRETS):
@echo "github_pat=\"${GH_TOKEN}\"" > $(SECRETS)
@echo "tfe_token=\"${TFE_TOKEN}\"" >> $(SECRETS)
@echo "aws_access_key_id=\"${AWS_ACCESS_KEY_ID}\"" >> $(SECRETS)
@echo "aws_secret_access_key=\"${AWS_SECRET_ACCESS_KEY}\"" >> $(SECRETS)
@echo "azuredevops_pat=\"${AZDO_PERSONAL_ACCESS_TOKEN}\"" >> $(SECRETS)
@echo "azuredevops_url=\"${AZDO_ORG_SERVICE_URL}\"" >> $(SECRETS)
fmt:
cd $(module) && terraform fmt -recursive
init:
cd $(module) && terraform init
validate:
cd $(module) && terraform validate
plan: validate fmt $(SECRETS)
cd $(module) && terraform plan
apply: validate fmt $(SECRETS)
cd $(module) && terraform apply