Last active
March 27, 2021 09:22
Star
You must be signed in to star a gist
Terraform Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAKEFLAGS += --silent | |
.PHONY: all init plan apply show destroy output graph | |
all: | |
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
init: ## Initialize a new or existing Terraform configuration | |
terraform validate | |
terraform init | |
plan: ## Generate and show an execution plan. | |
terraform validate | |
terraform plan | |
apply: plan ## Builds or changes infrastructure. | |
terraform apply | |
show: ## Inspect Terraform state or plan. | |
terraform show | |
destroy: ## Destroy Terraform-managed infrastructure. BE CAREFUL!!! | |
terraform destroy | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment