From 7012b57a2c440deaf903abe68462f48a35882e7e Mon Sep 17 00:00:00 2001 From: Nicolas Vuillamy Date: Sat, 14 Aug 2021 00:22:41 +0200 Subject: [PATCH] Upgrade tflint - Upgrade tflint descriptor to use ghcr.io/terraform-linters/tflint docker image and initialize tflint --- CHANGELOG.md | 2 ++ Dockerfile | 3 ++- flavors/terraform/Dockerfile | 3 ++- megalinter/descriptors/terraform.megalinter-descriptor.yml | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c650a9935e..0e0d5371ba0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), Note: Can be used with `nvuillam/mega-linter@insiders` in your GitHub Action mega-linter.yml file, or with `nvuillam/mega-linter@latest` docker image +- Upgrade tflint descriptor to use ghcr.io/terraform-linters/tflint docker image and initialize tflint + - Linter versions upgrades - [powershell](https://github.com/PowerShell/PSScriptAnalyzer) from 7.1.3 to **7.1.4** on 2021-08-13 - [checkov](https://www.checkov.io/) from 2.0.347 to **2.0.348** on 2021-08-13 diff --git a/Dockerfile b/Dockerfile index fa85b9b227f..4014c4a8104 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ FROM hadolint/hadolint:latest-alpine as hadolint FROM ghcr.io/assignuser/chktex-alpine:latest as chktex FROM yoheimuta/protolint:latest as protolint FROM ghcr.io/assignuser/lintr-lib:0.2.0 as lintr-lib -FROM wata727/tflint:latest as tflint +FROM ghcr.io/terraform-linters/tflint:latest as tflint FROM accurics/terrascan:latest as terrascan FROM alpine/terragrunt:latest as terragrunt #FROM__END @@ -433,6 +433,7 @@ RUN curl -L -o ./install-misspell.sh https://git.io/misspell \ # tflint installation COPY --from=tflint /usr/local/bin/tflint /usr/bin/ +RUN tflint --init # terrascan installation COPY --from=terrascan /go/bin/terrascan /usr/bin/ diff --git a/flavors/terraform/Dockerfile b/flavors/terraform/Dockerfile index a06e1026f28..484a3e34193 100644 --- a/flavors/terraform/Dockerfile +++ b/flavors/terraform/Dockerfile @@ -13,7 +13,7 @@ #FROM__START FROM hadolint/hadolint:latest-alpine as hadolint FROM yoheimuta/protolint:latest as protolint -FROM wata727/tflint:latest as tflint +FROM ghcr.io/terraform-linters/tflint:latest as tflint FROM accurics/terrascan:latest as terrascan FROM alpine/terragrunt:latest as terragrunt #FROM__END @@ -195,6 +195,7 @@ RUN curl -L -o ./install-misspell.sh https://git.io/misspell \ # tflint installation COPY --from=tflint /usr/local/bin/tflint /usr/bin/ +RUN tflint --init # terrascan installation COPY --from=terrascan /go/bin/terrascan /usr/bin/ diff --git a/megalinter/descriptors/terraform.megalinter-descriptor.yml b/megalinter/descriptors/terraform.megalinter-descriptor.yml index f617b2cc3f3..e3a617b30f4 100644 --- a/megalinter/descriptors/terraform.megalinter-descriptor.yml +++ b/megalinter/descriptors/terraform.megalinter-descriptor.yml @@ -18,8 +18,9 @@ linters: - "tflint -c .tflint.hcl myfile.tf" install: dockerfile: - - FROM wata727/tflint:latest as tflint + - FROM ghcr.io/terraform-linters/tflint:latest as tflint - COPY --from=tflint /usr/local/bin/tflint /usr/bin/ + - RUN tflint --init # TERRASCAN - linter_name: terrascan name: TERRAFORM_TERRASCAN