Skip to content

Commit 249d87f

Browse files
committed
fix: terraform taskfile
1 parent 0ee82c4 commit 249d87f

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

shared-files/taskfile/libraries/internal.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,22 @@ tasks:
1414
brew install {{.APP}} --quiet && \
1515
echo "✅ {{.APP}} installed successfully" || \
1616
echo "❌ Failed to install {{.APP}}"
17-
17+
18+
tools:brew:optional:
19+
desc: brew install
20+
silent: true
21+
preconditions:
22+
- sh: command -v brew
23+
msg: "brew is not installed. Please install brew. See CONTRIBUTING.md for the required tools"
24+
cmds:
25+
## Brew apps
26+
- cmd: |
27+
if [ {{.INSTALL_REQUIRED}} = true ]; then \
28+
brew install {{.APP}} --quiet && \
29+
echo "✅ {{.APP}} installed successfully" || \
30+
echo "❌ Failed to install {{.APP}}"
31+
fi
32+
1833
tools:brew:tap:
1934
desc: brew tap
2035
silent: true

shared-files/taskfile/libraries/terraform.yml

+11-8
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,17 @@ tasks:
3737
APP: '{{.ITEM}}'
3838
- task: install:module
3939

40-
# install:module:
41-
# desc: Install terraform module
42-
# cmds:
43-
# - if: IS_MODULE == "true"
44-
# then:
45-
# - terraform init
46-
# else:
47-
# - echo "This is not a terraform module"
40+
install:module:
41+
desc: Install terraform module
42+
internal: true
43+
cmds:
44+
- for: [
45+
tflint,
46+
]
47+
task: internal:tools:brew:optional
48+
vars:
49+
APP: '{{.ITEM}}'
50+
INSTALL_REQUIRED: '{{.IS_MODULE}}'
4851

4952
# * Lint
5053
lint:

0 commit comments

Comments
 (0)