File tree Expand file tree Collapse file tree 1 file changed +8
-15
lines changed Expand file tree Collapse file tree 1 file changed +8
-15
lines changed Original file line number Diff line number Diff line change 2626 run : terraform test
2727
2828 validateExamples :
29- name : Terraform Validate Example Files
29+ name : Terraform Validate Examples
3030 runs-on : ubuntu-latest
31- strategy :
32- fail-fast : false
33- matrix :
34- example :
35- - examples/same-account
36- - examples/cross-account
37- defaults :
38- run :
39- working-directory : ${{ matrix.example }}
4031
4132 steps :
4233 - name : Checkout
@@ -47,11 +38,13 @@ jobs:
4738 with :
4839 terraform_version : " 1.6.0"
4940
50- - name : Terraform Init
51- run : terraform init -input=false
52-
53- - name : Terraform Validate
54- run : terraform validate
41+ - name : Validate all example folders
42+ run : |
43+ for dir in examples/*/; do
44+ echo "Validating $dir"
45+ terraform -chdir="$dir" init -input=false > /dev/null
46+ terraform -chdir="$dir" validate
47+ done
5548
5649 collectInputs :
5750 name : Collect workflow inputs
You can’t perform that action at this time.
0 commit comments