Skip to content

Instantly share code, notes, and snippets.

@tankibaj
Last active January 19, 2023 16:28
Show Gist options
  • Save tankibaj/b436736fb79fa2450807ccc1c4aff8f7 to your computer and use it in GitHub Desktop.
Save tankibaj/b436736fb79fa2450807ccc1c4aff8f7 to your computer and use it in GitHub Desktop.
.ONESHELL:
.SHELL := /bin/bash
.PHONY: ALL
.DEFAULT_GOAL := help
help:
@echo "Available targets:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
install: ## Install required tools for local environment
brew install tfenv || exit 0
tfenv install || exit 0
brew install terraform_landscape || exit 0
fmt: ## Reformat your configuration in the standard style
terraform fmt -recursive
plan: ## Show changes required by the current configuration
terraform init && \
terraform plan
apply: ## Create or update infrastructure
terraform init && \
terraform apply
destroy: ## Destroy previously-created infrastructure
terraform destroy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment