From bec7b5d943953f0c19afb22cbe2eae4689d937f3 Mon Sep 17 00:00:00 2001 From: Anton Babenko Date: Thu, 18 Mar 2021 09:13:10 +0100 Subject: [PATCH 1/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9edd0c21c..68ee995e7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Collection of git hooks for Terraform to be used with [pre-commit framework](http://pre-commit.com/) -[![Github tag](https://img.shields.io/github/tag/antonbabenko/pre-commit-terraform.svg)](https://github.com/antonbabenko/pre-commit-terraform/releases) ![](https://img.shields.io/maintenance/yes/2020.svg) [![Help Contribute to Open Source](https://www.codetriage.com/antonbabenko/pre-commit-terraform/badges/users.svg)](https://www.codetriage.com/antonbabenko/pre-commit-terraform) +[![Github tag](https://img.shields.io/github/tag/antonbabenko/pre-commit-terraform.svg)](https://github.com/antonbabenko/pre-commit-terraform/releases) ![](https://img.shields.io/maintenance/yes/2021.svg) [![Help Contribute to Open Source](https://www.codetriage.com/antonbabenko/pre-commit-terraform/badges/users.svg)](https://www.codetriage.com/antonbabenko/pre-commit-terraform) ## How to install From fa3859e55f31a921152c0047f67edb62b564ebbc Mon Sep 17 00:00:00 2001 From: Sergio Kef Date: Wed, 24 Mar 2021 21:12:24 +0100 Subject: [PATCH 2/4] chore: Fix mistake on command (#185) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 68ee995e7..cd692e794 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ pip3 install pre-commit curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E "https://.+?-linux-amd64.tar.gz")" > terraform-docs.tgz && tar xzf terraform-docs.tgz && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/ curl -L "$(curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E "https://.+?_linux_amd64.zip")" > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/ env GO111MODULE=on go get -u github.com/tfsec/tfsec/cmd/tfsec -python3.7 -m pip install -U checkovpython3.7 -m pip install -U checkov +python3.7 -m pip install -U checkov ``` ### 2. Install the pre-commit hook globally From d27074b5a03fb4ccfb9261c9999411af2358a742 Mon Sep 17 00:00:00 2001 From: Manuel Vogel Date: Tue, 20 Apr 2021 12:13:25 +0200 Subject: [PATCH 3/4] fix: Fix and pin versions in Dockerfile (#193) --- Dockerfile | 25 +++++++------------------ README.md | 2 +- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2488ec41e..1bc60ebbb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,34 +1,24 @@ FROM ubuntu:18.04 ARG PRE_COMMIT_VERSION="2.11.1" -ARG GOLANG_VERSION="1.16" -ARG TERRAFORM_VERSION="0.14.8" -ARG TFSEC_VERSION="v0.39.6" -ARG TERRAFORM_DOCS_VERSION="latest" -ARG TFLINT_VERSION="latest" -ARG TFSEC_VERSION="v0.39.6" +ARG TERRAFORM_VERSION="0.15.0" +ARG TFSEC_VERSION="v0.39.21" +ARG TERRAFORM_DOCS_VERSION="v0.12.0" +ARG TFLINT_VERSION="v0.27.0" ARG CHECKOV_VERSION="1.0.838" # Install general dependencies RUN apt update && \ apt install -y curl git gawk unzip software-properties-common -# Install golang -RUN curl -L https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz > go${GOLANG_VERSION}.linux-amd64.tar.gz && \ - tar xzf go${GOLANG_VERSION}.linux-amd64.tar.gz && \ - rm -f go${GOLANG_VERSION}.linux-amd64.tar.gz -ENV GOPATH /go -RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" -ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH - # Install tools RUN add-apt-repository ppa:deadsnakes/ppa && \ apt install -y python3.7 python3-pip && \ pip3 install pre-commit==${PRE_COMMIT_VERSION} && \ - curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/${TERRAFORM_DOCS_VERSION} | grep -o -E "https://.+?-linux-amd64.tar.gz")" > terraform-docs.tgz && tar xzf terraform-docs.tgz && chmod +x terraform-docs && mv terraform-docs /usr/bin/ && \ - curl -L "$(curl -s https://api.github.com/repos/terraform-linters/tflint/releases/${TFLINT_VERSION} | grep -o -E "https://.+?_linux_amd64.zip")" > tflint.zip && unzip tflint.zip && rm tflint.zip && mv tflint /usr/bin/ && \ + curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases | grep -o -E "https://.+?${TERRAFORM_DOCS_VERSION}-linux-amd64.tar.gz")" > terraform-docs.tgz && tar xzf terraform-docs.tgz && chmod +x terraform-docs && mv terraform-docs /usr/bin/ && \ + curl -L "$(curl -s https://api.github.com/repos/terraform-linters/tflint/releases | grep -o -E "https://.+?/${TFLINT_VERSION}/tflint_linux_amd64.zip")" > tflint.zip && unzip tflint.zip && rm tflint.zip && mv tflint /usr/bin/ && \ + curl -L "$(curl -s https://api.github.com/repos/tfsec/tfsec/releases | grep -o -E "https://.+?/${TFSEC_VERSION}/tfsec-linux-amd64")" > tfsec && chmod +x tfsec && mv tfsec /usr/bin/ && \ python3.7 -m pip install -U checkov==${CHECKOV_VERSION} -RUN env GO111MODULE=on go get -u github.com/tfsec/tfsec/cmd/tfsec@${TFSEC_VERSION} # Install terraform because pre-commit needs it RUN curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - && \ @@ -36,7 +26,6 @@ RUN curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - && \ apt-get update && apt-get install terraform=${TERRAFORM_VERSION} # Checking all binaries are in the PATH -RUN go version RUN terraform --help RUN pre-commit --help RUN terraform-docs --help diff --git a/README.md b/README.md index cd692e794..a939111b3 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ sudo apt install -y python3.7 python3-pip pip3 install pre-commit curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E "https://.+?-linux-amd64.tar.gz")" > terraform-docs.tgz && tar xzf terraform-docs.tgz && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/ curl -L "$(curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E "https://.+?_linux_amd64.zip")" > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/ -env GO111MODULE=on go get -u github.com/tfsec/tfsec/cmd/tfsec +curl -L "$(curl -s https://api.github.com/repos/tfsec/tfsec/releases/latest | grep -o -E "https://.+?tfsec-linux-amd64")" > tfsec && chmod +x tfsec && mv tfsec /usr/bin/ python3.7 -m pip install -U checkov ``` From 96346e74d90467918729f8acafccd56c47e1be68 Mon Sep 17 00:00:00 2001 From: Anton Babenko Date: Tue, 20 Apr 2021 12:13:58 +0200 Subject: [PATCH 4/4] Updated CHANGELOG --- CHANGELOG.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3835136c..5686d7243 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ All notable changes to this project will be documented in this file. + +## [v1.49.0] - 2021-04-20 + +- fix: Fix and pin versions in Dockerfile ([#193](https://github.com/antonbabenko/pre-commit-terraform/issues/193)) +- chore: Fix mistake on command ([#185](https://github.com/antonbabenko/pre-commit-terraform/issues/185)) +- Update README.md + + ## [v1.48.0] - 2021-03-12 @@ -290,19 +298,23 @@ https://github.com/antonbabenko/pre-commit-terraform/commit/35e0356188b64a4c5af9 ## [v1.9.0] - 2019-02-18 +- Added CHANGELOG.md - Added chglog (hi [@robinbowes](https://github.com/robinbowes) :)) +- Merge pull request [#33](https://github.com/antonbabenko/pre-commit-terraform/issues/33) from chrisgilmerproj/run_terraform_docs_in_serial - Require terraform-docs runs in serial to avoid pre-commit doing parallel operations on similar file paths ## [v1.8.1] - 2018-12-15 +- Merge pull request [#30](https://github.com/antonbabenko/pre-commit-terraform/issues/30) from RothAndrew/feature/fix_issue_29 - Fix bug not letting terraform_docs_replace work in the root directory of a repo ## [v1.8.0] - 2018-12-14 +- Merge pull request [#27](https://github.com/antonbabenko/pre-commit-terraform/issues/27) from RothAndrew/feature/new_hook - fix typo - Address requested changes - Add `--dest` argument @@ -315,6 +327,7 @@ https://github.com/antonbabenko/pre-commit-terraform/commit/35e0356188b64a4c5af9 - Merge remote-tracking branch 'origin/master' into pr25 - Added followup after [#25](https://github.com/antonbabenko/pre-commit-terraform/issues/25) +- Merge pull request [#25](https://github.com/antonbabenko/pre-commit-terraform/issues/25) from getcloudnative/feat-pass-terraform-docs-opts - Add feature to pass options to terraform-docs. - Added license file (fixed [#21](https://github.com/antonbabenko/pre-commit-terraform/issues/21)) @@ -375,6 +388,8 @@ https://github.com/antonbabenko/pre-commit-terraform/commit/35e0356188b64a4c5af9 - Added badges - Added formatting for tfvars (fixes [#4](https://github.com/antonbabenko/pre-commit-terraform/issues/4)) ([#6](https://github.com/antonbabenko/pre-commit-terraform/issues/6)) +- Merge pull request [#5](https://github.com/antonbabenko/pre-commit-terraform/issues/5) from schneems/schneems/codetriage-badge +- [ci skip] Get more Open Source Helpers @@ -383,6 +398,7 @@ https://github.com/antonbabenko/pre-commit-terraform/commit/35e0356188b64a4c5af9 - Renamed shell script file to the correct one - Updated .pre-commit-hooks.yaml - Updated sha in README +- Merge pull request [#3](https://github.com/antonbabenko/pre-commit-terraform/issues/3) from pecigonzalo/master - Exclude .terraform even on subfolders @@ -401,7 +417,8 @@ https://github.com/antonbabenko/pre-commit-terraform/commit/35e0356188b64a4c5af9 - Initial commit -[Unreleased]: https://github.com/antonbabenko/pre-commit-terraform/compare/v1.48.0...HEAD +[Unreleased]: https://github.com/antonbabenko/pre-commit-terraform/compare/v1.49.0...HEAD +[v1.49.0]: https://github.com/antonbabenko/pre-commit-terraform/compare/v1.48.0...v1.49.0 [v1.48.0]: https://github.com/antonbabenko/pre-commit-terraform/compare/v1.47.0...v1.48.0 [v1.47.0]: https://github.com/antonbabenko/pre-commit-terraform/compare/v1.46.0...v1.47.0 [v1.46.0]: https://github.com/antonbabenko/pre-commit-terraform/compare/v1.45.0...v1.46.0