2020 name : Verify module
2121 strategy :
2222 matrix :
23- terraform : ["1.5.6 ", "latest"]
23+ terraform : ["1.4.0 ", "latest"]
2424 runs-on : ubuntu-latest
2525 container :
2626 image : hashicorp/terraform:${{ matrix.terraform }}
4343 touch lambdas/functions/termination-watcher/termination-watcher.zip
4444 - name : terraform init
4545 run : terraform init -get -backend=false -input=false
46- - if : contains( matrix.terraform, '1.5.')
46+ - if : matrix.terraform != 'latest'
4747 name : check terraform formatting
4848 run : terraform fmt -recursive -check=true -write=false
4949 - if : contains(matrix.terraform, 'latest') # check formatting for the latest release but avoid failing the build
@@ -52,22 +52,22 @@ jobs:
5252 continue-on-error : true
5353 - name : validate terraform
5454 run : terraform validate
55- - if : contains( matrix.terraform, '1.5.')
55+ - if : matrix.terraform != 'latest'
5656 name : Fix for actions/cache on alpine
5757 run : apk add --no-cache tar
5858 continue-on-error : true
59- - if : contains( matrix.terraform, '1.5.')
59+ - if : matrix.terraform != 'latest'
6060 uses : actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
6161 name : Cache TFLint plugin dir
6262 with :
6363 path : ~/.tflint.d/plugins
6464 key : tflint-${{ hashFiles('.tflint.hcl') }}
65- - if : contains( matrix.terraform, '1.5.')
65+ - if : matrix.terraform != 'latest'
6666 name : Setup TFLint
6767 uses : terraform-linters/setup-tflint@b480b8fcdaa6f2c577f8e4fa799e89e756bb7c93 # v6.2.2
6868 with :
6969 github_token : ${{ secrets.GITHUB_TOKEN }}
70- - if : contains( matrix.terraform, '1.5.')
70+ - if : matrix.terraform != 'latest'
7171 name : Run TFLint
7272 run : |
7373 tflint --init -c ${GITHUB_WORKSPACE}/.tflint.hcl
7878 strategy :
7979 fail-fast : false
8080 matrix :
81- terraform : ["1.5.6 ", "latest"]
81+ terraform : ["1.4.0 ", "latest"]
8282 module :
8383 [
8484 " ami-housekeeper" ,
@@ -117,7 +117,7 @@ jobs:
117117 persist-credentials : false
118118 - name : terraform init
119119 run : terraform init -get -backend=false -input=false
120- - if : contains( matrix.terraform, '1.3.')
120+ - if : matrix.terraform != 'latest'
121121 name : check terraform formatting
122122 run : terraform fmt -recursive -check=true -write=false
123123 - if : contains(matrix.terraform, 'latest') # check formatting for the latest release but avoid failing the build
@@ -126,22 +126,22 @@ jobs:
126126 continue-on-error : true
127127 - name : validate terraform
128128 run : terraform validate
129- - if : contains( matrix.terraform, '1.3.')
129+ - if : matrix.terraform != 'latest'
130130 name : Fix for actions/cache on alpine
131131 run : apk add --no-cache tar
132132 continue-on-error : true
133- - if : contains( matrix.terraform, '1.3.')
133+ - if : matrix.terraform != 'latest'
134134 uses : actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
135135 name : Cache TFLint plugin dir
136136 with :
137137 path : ~/.tflint.d/plugins
138138 key : tflint-${{ hashFiles('.tflint.hcl') }}
139- - if : contains( matrix.terraform, '1.3.')
139+ - if : matrix.terraform != 'latest'
140140 name : Setup TFLint
141141 uses : terraform-linters/setup-tflint@b480b8fcdaa6f2c577f8e4fa799e89e756bb7c93 # v6.2.2
142142 with :
143143 github_token : ${{ secrets.GITHUB_TOKEN }}
144- - if : contains( matrix.terraform, '1.3.')
144+ - if : matrix.terraform != 'latest'
145145 name : Run TFLint
146146 working-directory : ${{ github.workspace }}
147147 env :
@@ -155,7 +155,7 @@ jobs:
155155 strategy :
156156 fail-fast : false
157157 matrix :
158- terraform : ["1.5.6 ", "latest"]
158+ terraform : ["1.4.0 ", "latest"]
159159 example :
160160 [
161161 " default" ,
@@ -182,7 +182,7 @@ jobs:
182182 persist-credentials : false
183183 - name : terraform init
184184 run : terraform init -get -backend=false -input=false
185- - if : contains( matrix.terraform, '1.5.')
185+ - if : matrix.terraform != 'latest'
186186 name : check terraform formatting
187187 run : terraform fmt -recursive -check=true -write=false
188188 - if : contains(matrix.terraform, 'latest') # check formatting for the latest release but avoid failing the build
@@ -191,22 +191,22 @@ jobs:
191191 continue-on-error : true
192192 - name : validate terraform
193193 run : terraform validate
194- - if : contains( matrix.terraform, '1.5.')
194+ - if : matrix.terraform != 'latest'
195195 name : Fix for actions/cache on alpine
196196 run : apk add --no-cache tar
197197 continue-on-error : true
198- - if : contains( matrix.terraform, '1.5.')
198+ - if : matrix.terraform != 'latest'
199199 uses : actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
200200 name : Cache TFLint plugin dir
201201 with :
202202 path : ~/.tflint.d/plugins
203203 key : tflint-${{ hashFiles('.tflint.hcl') }}
204- - if : contains( matrix.terraform, '1.5.')
204+ - if : matrix.terraform != 'latest'
205205 name : Setup TFLint
206206 uses : terraform-linters/setup-tflint@b480b8fcdaa6f2c577f8e4fa799e89e756bb7c93 # v6.2.2
207207 with :
208208 github_token : ${{ secrets.GITHUB_TOKEN }}
209- - if : contains( matrix.terraform, '1.5.')
209+ - if : matrix.terraform != 'latest'
210210 name : Run TFLint
211211 working-directory : ${{ github.workspace }}
212212 env :
0 commit comments