|
55 | 55 | with:
|
56 | 56 | sarif_file: terrascan.sarif
|
57 | 57 |
|
| 58 | + tflint: |
| 59 | + runs-on: ubuntu-latest |
| 60 | + name: "TFlint" |
| 61 | + steps: |
| 62 | + - name: Checkout code |
| 63 | + uses: actions/checkout@v4 |
| 64 | + |
| 65 | + - uses: actions/cache@v4 |
| 66 | + name: Cache plugin dir |
| 67 | + with: |
| 68 | + path: ~/.tflint.d/plugins |
| 69 | + key: ${{ matrix.os }}-tflint-${{ hashFiles('.tflint.hcl') }} |
| 70 | + |
| 71 | + - uses: terraform-linters/setup-tflint@v4 |
| 72 | + name: Setup TFLint |
| 73 | + with: |
| 74 | + tflint_version: v0.52.0 |
| 75 | + |
| 76 | + - name: Show version |
| 77 | + run: tflint --version |
| 78 | + |
| 79 | + - name: Init TFLint |
| 80 | + run: tflint --init |
| 81 | + env: |
| 82 | + # https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md#avoiding-rate-limiting |
| 83 | + GITHUB_TOKEN: ${{ github.token }} |
| 84 | + |
| 85 | + - name: Run TFLint |
| 86 | + run: tflint -f compact --recursive --minimum-failure-severity=error |
| 87 | + |
58 | 88 | terraform:
|
59 |
| - name: "Terraform CICD" |
| 89 | + name: "Terraform" |
60 | 90 | runs-on: ubuntu-latest
|
61 | 91 | permissions:
|
62 | 92 | pull-requests: write # Required for creating or updating PRs
|
@@ -116,28 +146,6 @@ jobs:
|
116 | 146 | id: validate
|
117 | 147 | run: terraform validate
|
118 | 148 |
|
119 |
| - - uses: actions/cache@v4 |
120 |
| - name: Cache plugin dir |
121 |
| - with: |
122 |
| - path: ~/.tflint.d/plugins |
123 |
| - key: ${{ matrix.os }}-tflint-${{ hashFiles('.tflint.hcl') }} |
124 |
| - |
125 |
| - - uses: terraform-linters/setup-tflint@v4 |
126 |
| - name: Setup TFLint |
127 |
| - with: |
128 |
| - tflint_version: v0.52.0 |
129 |
| - - name: Show version |
130 |
| - run: tflint --version |
131 |
| - |
132 |
| - - name: Init TFLint |
133 |
| - run: tflint --init |
134 |
| - env: |
135 |
| - # https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md#avoiding-rate-limiting |
136 |
| - GITHUB_TOKEN: ${{ github.token }} |
137 |
| - |
138 |
| - - name: Run TFLint |
139 |
| - run: tflint -f compact --recursive --minimum-failure-severity=error |
140 |
| - |
141 | 149 | - name: Terraform plan [pull_request]
|
142 | 150 | id: plan-pr
|
143 | 151 | if: github.event_name == 'pull_request'
|
@@ -213,6 +221,7 @@ jobs:
|
213 | 221 | echo "unsupported environment";
|
214 | 222 | fi
|
215 | 223 | terraform apply -var-file=variables/$ENV.auto.tfvars -auto-approve -lock=false
|
| 224 | +
|
216 | 225 | otel-cicd-action:
|
217 | 226 | if: always()
|
218 | 227 | name: OpenTelemetry Export Trace
|
|
0 commit comments