-
Notifications
You must be signed in to change notification settings - Fork 12
/
makefile
39 lines (29 loc) · 1.11 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
SHELL := /usr/bin/env bash
export AWS_PROFILE=$(aws_profile)
export TF_PLUGIN_CACHE_DIR=$(HOME)/.terraform.d/plugin-cache
init:
brew install terragrunt terraform sops gnupg
format:
cd infra && terraform fmt -check
cd infra && terraform fmt -recursive
cd terragrunt && terragrunt hclfmt
validate:
cd terragrunt/$(directory) && terragrunt run-all validate
plan:
cd terragrunt/$(directory) && terragrunt run-all plan
apply:
cd terragrunt/$(directory) && terragrunt run-all apply
destroy:
cd terragrunt/$(directory) && terragrunt run-all destroy
validate-module:
cd terragrunt/$(directory) && terragrunt run-all plan --terragrunt-include-dir $(module)
plan-module:
cd terragrunt/$(directory) && terragrunt run-all plan --terragrunt-include-dir $(module)
apply-module:
cd terragrunt/$(directory) && terragrunt run-all apply --terragrunt-include-dir $(module)
destroy-module:
cd terragrunt/$(directory) && terragrunt run-all destroy --terragrunt-working-dir $(module)
unlock:
cd terragrunt/$(directory) && terragrunt force-unlock $(lock_id)
clean-cache:
find . -type d -name ".terragrunt-cache" -prune -exec rm -rf {} \;