File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -28,21 +28,34 @@ jobs:
2828 tflint --recursive --format compact
2929
3030 validate :
31- name : Validate
31+ name : Validate Examples
3232 runs-on : ubuntu-latest
33+ strategy :
34+ matrix :
35+ example :
36+ # Add new examples here as they are created
37+ - " aws/examples/simple"
38+ fail-fast : false
3339 steps :
3440 - uses : actions/checkout@v4
3541
3642 - uses : hashicorp/setup-terraform@v3
3743 with :
3844 terraform_version : " 1.7.0"
3945
46+ - name : Check if example exists
47+ run : |
48+ if [ ! -d "${{ matrix.example }}" ]; then
49+ echo "Example directory ${{ matrix.example }} does not exist, skipping"
50+ exit 0
51+ fi
52+
4053 - name : Terraform Init
4154 run : |
42- cd examples/simple
55+ cd ${{ matrix.example }}
4356 terraform init -backend=false
4457
4558 - name : Terraform Validate
4659 run : |
47- cd examples/simple
60+ cd ${{ matrix.example }}
4861 terraform validate
You can’t perform that action at this time.
0 commit comments