Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
terminal

GitHub Action

Setup TFLint

v1.0.2

Setup TFLint

terminal

Setup TFLint

Sets up tflint CLI in your GitHub Actions workflow

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Setup TFLint

uses: terraform-linters/setup-tflint@v1.0.2

Learn more about this action in terraform-linters/setup-tflint

Choose a version

Setup TFLint Action

A GitHub action that installs a Terraform linter TFLint executable in the PATH.

Inputs

tflint_version

Required The version of TFLint which will be installed. See TFLint releases page for valid versions.

If version is "latest", the action will get the latest version number using Octokit.

Default: "latest"

token

If set, token will be used for Octokit authentication. Authenticating will increase the API rate limit.

Outputs

The action does not have any output.

Usage

name: Test
on:
  push:
    branches: [ master ]

jobs:
  example-job:
  runs-on: ${{ matrix.os }}

  strategy:
    matrix:
      os: [ubuntu-latest, macos-latest, windows-latest]

  steps:
    - uses: actions/checkout@v1
      name: Checkout source code

    - uses: lablabs/setup-tflint@v1
      name: Setup TFLint
      with:
        tflint_version: v0.18.0

    - shell: bash
      run: |
        tflint --version

For latest release you can omit version variable and use

- uses: lablabs/setup-tflint@v1

or specify it explicitly as

- uses: lablabs/setup-tflint@v1
  with:
    tflint_version: latest

For authenticating with the GITHUB_TOKEN you can use

- uses: lablabs/setup-tflint@v1
  with:
    token: ${{ secrets.GITHUB_TOKEN }}