Skip to content

Commit 4f0b730

Browse files
add tflint
1 parent 6e75d25 commit 4f0b730

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.github/workflows/semgrep.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ jobs:
4444
# Connect to Semgrep AppSec Platform through your SEMGREP_APP_TOKEN.
4545
# Generate a token from Semgrep AppSec Platform > Settings
4646
# and add it to your GitHub secrets.
47-
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
47+
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}

.github/workflows/terraform.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,28 @@ jobs:
7474
id: validate
7575
run: terraform validate
7676

77+
- uses: actions/cache@v4
78+
name: Cache plugin dir
79+
with:
80+
path: ~/.tflint.d/plugins
81+
key: ${{ matrix.os }}-tflint-${{ hashFiles('.tflint.hcl') }}
82+
83+
- uses: terraform-linters/setup-tflint@v4
84+
name: Setup TFLint
85+
with:
86+
tflint_version: v0.52.0
87+
- name: Show version
88+
run: tflint --version
89+
90+
- name: Init TFLint
91+
run: tflint --init
92+
env:
93+
# https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md#avoiding-rate-limiting
94+
GITHUB_TOKEN: ${{ github.token }}
95+
96+
- name: Run TFLint
97+
run: tflint -f compact
98+
7799
- name: Terraform plan [pull_request]
78100
id: plan-pr
79101
if: github.event_name == 'pull_request'

0 commit comments

Comments
 (0)