-
Notifications
You must be signed in to change notification settings - Fork 343
/
Makefile
41 lines (32 loc) · 1.29 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
PROVIDERS = rancher/rancher-common rancher/aws rancher/azure rancher/do rancher/gcp rancher/hcloud rancher/linode rancher/scw rancher/outscale neuvector/aws rancher/harvester
CLOUD_PROVIDERS = rancher/aws rancher/azure rancher/do rancher/gcp rancher/hcloud rancher/linode rancher/scw rancher/outscale neuvector/aws rancher/harvester
upgrade-targets = $(addprefix upgrade-, $(PROVIDERS))
docs-targets = $(addprefix docs-, $(PROVIDERS))
tfvars-targets = $(addprefix tfvars-, $(PROVIDERS))
fmt-targets = $(addprefix fmt-, $(PROVIDERS))
validate-targets = $(addprefix validate-, $(PROVIDERS))
plan-targets = $(addprefix plan-, $(CLOUD_PROVIDERS))
upgrade: $(upgrade-targets)
$(upgrade-targets): upgrade-%: %
cd $< && terraform init -upgrade
docs: $(docs-targets)
$(docs-targets): docs-%: %
cd $< && terraform-docs -c ../../.terraform-docs-readme.yml .
tfvars: $(tfvars-targets)
$(tfvars-targets): tfvars-%: %
cd $< && terraform-docs -c ../../.terraform-docs-tfvars.yml .
fmt: $(fmt-targets)
$(fmt-targets): fmt-%: %
cd $< && terraform fmt
validate: $(validate-targets)
$(validate-targets): validate-%: %
cd $< && terraform validate
plan: $(plan-targets)
$(plan-targets): plan-%: %
cd $< && terraform plan
.PHONY: test
test:
cd test/ && go test -v -timeout 45m
.PHONY: clean
clean:
rm */*/terraform.tfstate.backup