iam modules #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Terraform Lint | |
on: | |
- pull_request | |
jobs: | |
tflint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout source code | |
- uses: actions/cache@v4 | |
name: Cache plugin dir | |
with: | |
path: ~/.tflint.d/plugins | |
key: tflint-${{ hashFiles('.tflint.hcl') }} | |
- uses: terraform-linters/setup-tflint@v4 | |
name: Setup TFLint | |
with: | |
tflint_version: v0.50.3 | |
tflint_wrapper: true | |
- name: Show version | |
run: tflint --version | |
- name: Init TFLint | |
run: tflint --init | |
env: | |
# https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md#avoiding-rate-limiting | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Run TFLint | |
run: | | |
tflint -f compact --chdir . | |
tflint -f compact --chdir modules/cloudfront-app | |
tflint -f compact --chdir modules/cloudfront-deployment-policy | |
tflint -f compact --chdir modules/cloudfront-s3-origin-bucket-policy | |
- run: echo ${{ steps.tflint.outputs.stdout }} | |
- run: echo ${{ steps.tflint.outputs.stderr }} | |
- run: echo ${{ steps.tflint.outputs.exitcode }} |