-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (23 loc) · 838 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
30
31
TERRAFORM_DIR := terraform
up: init
@echo "Applying Terraform configuration..."
cd $(TERRAFORM_DIR) && terraform apply -auto-approve
down: init
@echo "Destroying all Terraform resources..."
cd $(TERRAFORM_DIR) && terraform destroy -auto-approve
ssh:
@echo "Connecting via gcloud compute ssh..."
gcloud compute ssh --zone "us-central1-a" "instance1" --tunnel-through-iap --project "nat-dev-1"
ssh-nat:
@echo "Connecting to nat via gcloud compute ssh..."
gcloud compute ssh --zone "us-central1-a" "nat1" --tunnel-through-iap --project "nat-dev-1"
init:
@echo "Initializing Terraform..."
cd $(TERRAFORM_DIR) && terraform init
plan: init
@echo "Showing Terraform plan..."
cd $(TERRAFORM_DIR) && terraform plan
fmt:
@echo "Formatting Terraform configuration..."
cd $(TERRAFORM_DIR) && terraform fmt -recursive
.PHONY: *