File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ version : " 3.0"
2+
3+ set : ['e', 'u', 'pipefail']
4+ shopt : ['globstar']
5+
6+ dotenv : ['.env']
7+
8+ env :
9+ TLD : " {{.ROOT_DIR}}"
10+
11+ vars :
12+
13+ includes :
14+ terraform :
15+ taskfile : ./taskfiles/terraform.yml
16+ aliases : ["tf"]
17+
18+ tasks :
19+ default :
20+ desc : " Default task"
21+ cmds :
22+ - task --list
23+
24+ install-devbox :
25+ desc : " Install devbox"
26+ cmds :
27+ - |
28+ if ! [[ $(command -v devbox 2>/dev/null) ]]; then
29+ curl -fsSL https://get.jetify.com/devbox | bash
30+ fi
31+ run : once
32+ silent : true
33+
34+ install :
35+ desc : " Install project dependencies"
36+ deps : ["install-devbox"]
37+ cmds :
38+ - devbox install
39+
40+ pre-commit :
41+ desc : " Run pre-commit hooks"
42+ cmds :
43+ - pre-commit run --all-files
Original file line number Diff line number Diff line change 1+ version : " 3.0"
2+
3+ set : ['e', 'u', 'pipefail']
4+ shopt : ['globstar']
5+
6+ env :
7+
8+ tasks :
9+ fmt :
10+ desc : " Format Terraform files"
11+ cmds :
12+ - terraform fmt
13+ dir : " {{.ROOT_DIR}}/terraform"
14+
15+ _init :
16+ internal : true
17+ desc : " Internal task to initialize tflint"
18+ cmds :
19+ - tflint --init 2>&1 > /dev/null
20+ run : once
21+ silent : true
22+ dir : " {{.ROOT_DIR}}/terraform"
23+
24+ lint :
25+ desc : " Lint Terraform files"
26+ deps : ["_init"]
27+ cmds :
28+ - tflint
29+ dir : " {{.ROOT_DIR}}/terraform"
30+
31+ validate :
32+ desc : " Validate Terraform configuration"
33+ cmds :
34+ - terraform validate
35+ dir : " {{.ROOT_DIR}}/terraform"
36+
37+ init :
38+ desc : " Initialize Terraform"
39+ cmds :
40+ - terraform init
41+ dir : " {{.ROOT_DIR}}/terraform"
42+
43+ plan :
44+ desc : " Plan Terraform configuration"
45+ cmds :
46+ - terraform plan -out tfplan
47+ dir : " {{.ROOT_DIR}}/terraform"
48+
49+ apply :
50+ desc : " Apply Terraform configuration"
51+ cmds :
52+ - terraform apply -auto-approve
53+ dir : " {{.ROOT_DIR}}/terraform"
54+
55+ destroy :
56+ desc : " Destroy Terraform-managed infrastructure"
57+ cmds :
58+ - terraform destroy -auto-approve
59+ dir : " {{.ROOT_DIR}}/terraform"
You can’t perform that action at this time.
0 commit comments