File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ version : 2
2
+
3
+ jobs :
4
+ build :
5
+ docker :
6
+ - image : hashicorp/terraform:0.11.2
7
+ entrypoint : /bin/sh
8
+ steps :
9
+ - checkout
10
+ - run :
11
+ name : Validate tf files (terraform validate)
12
+ command : find . -type f -name "*.tf" -exec dirname {} \;|sort -u | while read m; do (terraform validate -check-variables=false "$m" && echo "√ $m") || exit 1 ; done
13
+ - run :
14
+ name : check if all tf files are formatted (terraform fmt)
15
+ command : if [ `terraform fmt | wc -c` -ne 0 ]; then echo "Some terraform files need be formatted, run 'terraform fmt' to fix"; exit 1; fi
16
+ - run :
17
+ name : " Install: tflint"
18
+ command : |
19
+ apk add wget
20
+ wget https://github.com/wata727/tflint/releases/download/v0.5.4/tflint_linux_amd64.zip
21
+ unzip tflint_linux_amd64.zip
22
+ mkdir -p /usr/local/tflint/bin
23
+ export PATH=/usr/local/tflint/bin:$PATH
24
+ install tflint /usr/local/tflint/bin
25
+ - run :
26
+ name : " tflint check"
27
+ command : /usr/local/tflint/bin/tflint
28
+
29
+ workflows :
30
+ version : 2
31
+ build :
32
+ jobs :
33
+ - build
You can’t perform that action at this time.
0 commit comments