github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/terraform/gcp/Makefile (about) 1 .PHONY: help 2 help: ## Print this help 3 help: 4 @echo 'Usage: make <target>' 5 @echo 6 @echo -e 'Targets:' 7 @egrep '^(.+)\:\ ##\ (.+)' $(MAKEFILE_LIST) | column -t -c 2 -s ':#' 8 9 .PHONY: packer/validate 10 packer/validate: ## Validate the HashiStack Packer configuration 11 packer validate packer.json 12 13 .PHONY: packer/build 14 packer/build: ## Build the HashiStack image with Packer 15 time packer build \ 16 -force \ 17 -timestamp-ui \ 18 -var="project=${GOOGLE_PROJECT}" \ 19 -var="credentials=${GOOGLE_APPLICATION_CREDENTIALS}" \ 20 packer.json 21 22 .PHONY: terraform/validate 23 terraform/validate: ## Validate the Terraform configuration 24 cd modules/hashistack; \ 25 terraform init; \ 26 terraform validate . 27 28 .PHONY: terraform/plan 29 terraform/plan: ## Run a Terraform Plan 30 cd modules/hashistack; \ 31 terraform init; \ 32 terraform plan \ 33 -var="project=${GOOGLE_PROJECT}" \ 34 -var="credentials=${GOOGLE_APPLICATION_CREDENTIALS}" 35 36 .PHONY: terraform/apply 37 terraform/apply: ## Run a Terraform Apply 38 cd modules/hashistack; \ 39 terraform init; \ 40 terraform apply \ 41 -auto-approve \ 42 -var="project=${GOOGLE_PROJECT}" \ 43 -var="credentials=${GOOGLE_APPLICATION_CREDENTIALS}" 44 45 .PHONY: terraform/destroy 46 terraform/destroy: ## Plan the Terraform configuration 47 cd modules/hashistack; \ 48 terraform init; \ 49 terraform destroy \ 50 -auto-approve \ 51 -var="project=${GOOGLE_PROJECT}" \ 52 -var="credentials=${GOOGLE_APPLICATION_CREDENTIALS}" 53 54 .PHONY: terraform/validate/example/us-east 55 terraform/validate/example/us-east: ## Validate the Terraform configuration for the us-east example env 56 cd env/us-east; \ 57 terraform init; \ 58 terraform validate . 59 60 .PHONY: terraform/plan/example/us-east 61 terraform/plan/example/us-east: ## Run a Terraform Plan for the us-east example env 62 cd env/us-east; \ 63 terraform init; \ 64 terraform plan -var="project=${GOOGLE_PROJECT}" -var="credentials=${GOOGLE_APPLICATION_CREDENTIALS}" 65 66 .PHONY: terraform/apply/example/us-east 67 terraform/apply/example/us-east: ## Run a Terraform Apply for the us-east example env 68 cd env/us-east; \ 69 terraform init; \ 70 terraform apply \ 71 -auto-approve \ 72 -var="project=${GOOGLE_PROJECT}" \ 73 -var="credentials=${GOOGLE_APPLICATION_CREDENTIALS}" 74 75 .PHONY: terraform/destroy/example/us-east 76 terraform/destroy/example/us-east: ## Plan the Terraform configuration for the us-east example env 77 cd env/us-east; \ 78 terraform init; \ 79 terraform destroy \ 80 -auto-approve \ 81 -var="project=${GOOGLE_PROJECT}" \ 82 -var="credentials=${GOOGLE_APPLICATION_CREDENTIALS}" 83 84 .PHONY: gcloud/login/server 85 gcloud/login/server: ## Login to a server instance using gcloud 86 gcloud compute ssh hashistack-server-0 87 88 .PHONY: gcloud/login/client 89 gcloud/login/client: ## Login to a client instance using gcloud 90 gcloud compute ssh hashistack-client-0