Skip to content

Commit 9a34364

Browse files
author
rahul-infra
committed
Made changes in github workflow
1 parent fe0042e commit 9a34364

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

.github/workflows/terraform-checks.yaml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,8 @@ jobs:
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

0 commit comments

Comments
 (0)