├── .github ├── dependabot.yml └── workflows │ └── docker.yml ├── Dockerfile ├── LICENSE └── README.md /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: weekly 7 | - package-ecosystem: "docker" 8 | directory: "/" 9 | schedule: 10 | interval: weekly 11 | -------------------------------------------------------------------------------- /.github/workflows/docker.yml: -------------------------------------------------------------------------------- 1 | name: docker 2 | 3 | on: 4 | push: 5 | tags: 6 | - v*.*.* 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v3 17 | - name: Set up Docker Buildx 18 | uses: docker/setup-buildx-action@v2 19 | - name: Docker meta 20 | id: meta 21 | uses: docker/metadata-action@v4 22 | with: 23 | images: ghcr.io/${{ github.repository }} 24 | - name: Login to GitHub Container Registry 25 | uses: docker/login-action@v2 26 | with: 27 | registry: ghcr.io 28 | username: ${{ github.repository_owner }} 29 | password: ${{ secrets.GITHUB_TOKEN }} 30 | - name: Build and push 31 | uses: docker/build-push-action@v4 32 | with: 33 | platforms: 'linux/amd64,linux/arm64/v8' 34 | push: ${{ github.event_name != 'pull_request' }} 35 | tags: ${{ steps.meta.outputs.tags }} 36 | labels: ${{ steps.meta.outputs.labels }} 37 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM --platform=$BUILDPLATFORM alpine:3.18.3 as builder 2 | 3 | ARG TARGETOS TARGETARCH 4 | 5 | ARG TFLINT_VERSION=0.48.0 6 | ARG AWS_VERSION=0.26.0 7 | ARG AZURERM_VERSION=0.24.0 8 | ARG GOOGLE_VERSION=0.24.0 9 | 10 | RUN wget -O /tmp/tflint.zip https://github.com/terraform-linters/tflint/releases/download/v"${TFLINT_VERSION}"/tflint_"${TARGETOS}"_"${TARGETARCH}".zip \ 11 | && unzip /tmp/tflint.zip -d /usr/local/bin \ 12 | && rm /tmp/tflint.zip 13 | 14 | RUN mkdir -p ~/.tflint.d/plugins 15 | 16 | RUN wget -O /tmp/tflint-ruleset-aws.zip https://github.com/terraform-linters/tflint-ruleset-aws/releases/download/v"${AWS_VERSION}"/tflint-ruleset-aws_"${TARGETOS}"_"${TARGETARCH}".zip \ 17 | && unzip /tmp/tflint-ruleset-aws.zip -d ~/.tflint.d/plugins \ 18 | && rm /tmp/tflint-ruleset-aws.zip 19 | 20 | RUN wget -O /tmp/tflint-ruleset-azurerm.zip https://github.com/terraform-linters/tflint-ruleset-azurerm/releases/download/v"${AZURERM_VERSION}"/tflint-ruleset-azurerm_"${TARGETOS}"_"${TARGETARCH}".zip \ 21 | && unzip /tmp/tflint-ruleset-azurerm.zip -d ~/.tflint.d/plugins \ 22 | && rm /tmp/tflint-ruleset-azurerm.zip 23 | 24 | RUN wget -O /tmp/tflint-ruleset-google.zip https://github.com/terraform-linters/tflint-ruleset-google/releases/download/v"${GOOGLE_VERSION}"/tflint-ruleset-google_"${TARGETOS}"_"${TARGETARCH}".zip \ 25 | && unzip /tmp/tflint-ruleset-google.zip -d ~/.tflint.d/plugins \ 26 | && rm /tmp/tflint-ruleset-google.zip 27 | 28 | FROM alpine:3.18.3 29 | 30 | LABEL maintainer=terraform-linters 31 | 32 | RUN apk add --no-cache ca-certificates 33 | 34 | COPY --from=builder /usr/local/bin/tflint /usr/local/bin 35 | COPY --from=builder /root/.tflint.d /root/.tflint.d 36 | 37 | ENTRYPOINT ["tflint"] 38 | WORKDIR /data 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Terraform Linters 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tflint-bundle 2 | 3 | **DEPRECATED: This project is deprecated. We strongly recommend migrating to plugin management with `.tflint.hcl` and Renovate.** 4 | 5 | A Docker image with TFLint and ruleset plugins 6 | 7 | ```console 8 | docker pull ghcr.io/terraform-linters/tflint-bundle 9 | ``` 10 | 11 | Bundled versions: 12 | 13 | - TFLint v0.48.0 14 | - tflint-ruleset-aws v0.26.0 15 | - tflint-ruleset-azurerm v0.24.0 16 | - tflint-ruleset-google v0.24.0 17 | 18 | These ruleset plugins are installed manually. If you want to enable it, just set `enabled = true` without specifying the version. 19 | 20 | ```hcl 21 | plugin "aws" { enabled = true } 22 | plugin "azurerm" { enabled = true } 23 | plugin "google" { enabled = true } 24 | ``` 25 | --------------------------------------------------------------------------------