Terraform-IaC/Makefile

28 lines
605 B
Makefile
Raw Permalink Normal View History

CODE_PATH ?= .
2023-07-09 17:03:05 +01:00
pre-commit:
@cd $(CODE_PATH) && pre-commit run --files *
init:
@cd $(CODE_PATH) && terraform init -reconfigure -upgrade -backend-config=./backend.tfvars
plan: init validate
@cd $(CODE_PATH) && terraform plan
apply: init validate
@cd $(CODE_PATH) && terraform apply --auto-approve
refresh: init validate
@cd $(CODE_PATH) && terraform refresh
fmt:
@cd $(CODE_PATH) && terraform fmt -check -recursive
validate:
@cd $(CODE_PATH) && terraform validate
output: init
2022-12-03 03:17:50 +00:00
@cd $(CODE_PATH) && terraform output
destroy: init validate
@cd $(CODE_PATH) && terraform destroy --auto-approve