2022-12-03 02:03:42 +00:00
|
|
|
CODE_PATH ?= .
|
|
|
|
|
|
|
|
init:
|
2023-07-09 16:45:21 +01:00
|
|
|
@cd $(CODE_PATH) && terraform init -reconfigure -upgrade -backend-config=./backend.tfvars
|
2022-12-03 02:03:42 +00:00
|
|
|
|
|
|
|
plan: init validate
|
2023-07-09 16:45:21 +01:00
|
|
|
@cd $(CODE_PATH) && terraform plan
|
2022-12-03 02:03:42 +00:00
|
|
|
|
|
|
|
apply: init validate
|
2023-07-09 16:45:21 +01:00
|
|
|
@cd $(CODE_PATH) && terraform apply --auto-approve
|
2022-12-03 02:03:42 +00:00
|
|
|
|
|
|
|
refresh: init validate
|
2023-07-09 16:45:21 +01:00
|
|
|
@cd $(CODE_PATH) && terraform refresh
|
2022-12-03 02:03:42 +00:00
|
|
|
|
|
|
|
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
|
2023-07-09 16:45:21 +01:00
|
|
|
@cd $(CODE_PATH) && terraform destroy --auto-approve
|