-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
47 lines (36 loc) · 1.02 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
42
43
44
45
46
47
.DEFAULT_GOAL := help
CLUSTER_NAME ?= tf-$(shell whoami)
.PHONY: init
init:
terraform init -upgrade
.PHONY: create.public
create.public:
terraform plan -out rosa.plan \
-var "cluster_name=$(CLUSTER_NAME)" \
-var "enable_private_link=false"
terraform apply rosa.plan
.PHONY: create.privatelink
create.privatelink:
terraform plan -out rosa.plan \
-var "cluster_name=$(CLUSTER_NAME)" \
-var "enable_private_link=true"
terraform apply rosa.plan
.PHONY: create.pl
create.pl: privatelink
.PHONY: create.private-link
create.private-link: privatelink
.PHONY: create.private_link
create.private_link: privatelink
.PHONY: destroy.public
destroy.public:
terraform destroy -var "cluster_name=$(CLUSTER_NAME)" \
-var "enable_private_link=false" -auto-approve
.PHONY: destroy.privatelink
destroy.privatelink:
terraform destroy -var "cluster_name=$(CLUSTER_NAME)" \
-var "enable_private_link=true" -auto-approve
.PHONY: help
help:
@echo "Usage:"
@echo " make create.[public|privatelink]"
@echo " make destroy.[public|privatelink]"