Skip to content

Commit

Permalink
ci: refactor terraform validation
Browse files Browse the repository at this point in the history
  • Loading branch information
npalm committed Nov 16, 2024
1 parent 47ebd8a commit 7bf83a9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 73 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/terraform-validate-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,18 @@ jobs:
with:
path: ~/.tflint.d/plugins
key: tflint-${{ hashFiles('.tflint.hcl') }}
# - name: Setup TFLint
# uses: terraform-linters/setup-tflint@19a52fbac37dacb22a09518e4ef6ee234f2d4987 # v4.0.0
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# - name: Run TFLint
# run: |
# tflint --init -c ${GITHUB_WORKSPACE}/.tflint.hcl
# tflint -c ${GITHUB_WORKSPACE}/.tflint.hcl --var-file ${GITHUB_WORKSPACE}/.github/lint/tflint.tfvars ${{ inputs.tflint-options }}
- name: Setup TFLint
if: github.event_name != 'pull_request'
uses: terraform-linters/setup-tflint@19a52fbac37dacb22a09518e4ef6ee234f2d4987 # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Run TFLint
if: github.event_name != 'pull_request'
run: |
tflint --init -c ${GITHUB_WORKSPACE}/.tflint.hcl
tflint -c ${GITHUB_WORKSPACE}/.tflint.hcl --var-file ${GITHUB_WORKSPACE}/.github/lint/tflint.tfvars ${{ inputs.tflint-options }}
- name: tflint
if: github.event_name != 'pull_request'
uses: reviewdog/[email protected]
env:
TFLINT_CONFIG: ${GITHUB_WORKSPACE}/.tflint.hcl
Expand Down
65 changes: 0 additions & 65 deletions .terraform.lock.hcl

This file was deleted.

0 comments on commit 7bf83a9

Please sign in to comment.