Last active
March 27, 2021 09:22
-
-
Save p0bailey/8f1f36117cf3aee9ced2c550a0668b29 to your computer and use it in GitHub Desktop.
Terraform Makefile
This file contains hidden or 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