From 270f7fd80dc4bb3d7ee02fbde0d6581e2f4f939f Mon Sep 17 00:00:00 2001 From: amirbenv <74685902+amirbenv@users.noreply.github.com> Date: Fri, 22 Jan 2021 11:10:40 -0800 Subject: [PATCH 1/4] Update README.md --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index fb29e362e..a20c8d04a 100644 --- a/README.md +++ b/README.md @@ -116,15 +116,6 @@ Terrascan is also available as a Docker image and can be used as follows $ docker run accurics/terrascan ``` -### Install via go get, if you have Go installed -``` -$ export GO111MODULE=on -$ go get -u github.com/accurics/terrascan/cmd/terrascan - go: downloading github.com/accurics/terrascan v1.3.0 - go: found github.com/accurics/terrascan/cmd/terrascan in github.com/accurics/terrascan v1.3.0 - ... -$ terrascan -``` ### Building Terrascan Terrascan can be built locally. This is helpful if you want to be on the latest version or when developing Terrascan. @@ -136,6 +127,17 @@ $ make build $ ./bin/terrascan ``` +### To build your own docker, refer to this example (Alpine Linux): +``` +FROM golang:alpine AS build-env + +RUN apk add --update git + +RUN git clone https://github.com/accurics/terrascan && cd terrascan \ + && CGO_ENABLED=0 GO111MODULE=on go build -o /go/bin/terrascan cmd/terrascan/main.go + +``` + ## Developing Terrascan To learn more about developing and contributing to Terrascan refer to the [contributing guide](CONTRIBUTING.md). From 25ce75647815d698f6dbdd06f7a80795b8f4ea01 Mon Sep 17 00:00:00 2001 From: Cesar Rodriguez Date: Fri, 22 Jan 2021 16:11:27 -0500 Subject: [PATCH 2/4] updates changelog for 1.3.1 --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c25a2bc5b..75f76c4b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## [v1.3.1](https://github.com/accurics/terrascan/tree/v1.3.1) (2021-01-22) + +[Full Changelog](https://github.com/accurics/terrascan/compare/v1.3.0...v1.3.1) + +**Implemented enhancements:** + +- Tag container image with release version [\#504](https://github.com/accurics/terrascan/issues/504) + +**Fixed bugs:** + +- Terrascan 1.3.0 fails to build on alpine [\#506](https://github.com/accurics/terrascan/issues/506) +- terrascan consider source = "terraform-aws-modules/vpc/aws" as local path [\#418](https://github.com/accurics/terrascan/issues/418) +- Failed to read module directory [\#332](https://github.com/accurics/terrascan/issues/332) + +**Closed issues:** + +- Custom Variable Validation no longer experiemental in 0.13 [\#500](https://github.com/accurics/terrascan/issues/500) + +**Merged pull requests:** + +- release v1.3.1 [\#508](https://github.com/accurics/terrascan/pull/508) ([kanchwala-yusuf](https://github.com/kanchwala-yusuf)) +- fix dependencies that were breaking the darwin/arm64 build [\#507](https://github.com/accurics/terrascan/pull/507) ([williepaul](https://github.com/williepaul)) +- support for terraform registry remote modules [\#505](https://github.com/accurics/terrascan/pull/505) ([patilpankaj212](https://github.com/patilpankaj212)) +- Readme rule supression [\#503](https://github.com/accurics/terrascan/pull/503) ([amirbenv](https://github.com/amirbenv)) +- Bump github.com/hashicorp/go-retryablehttp from 0.6.6 to 0.6.8 [\#496](https://github.com/accurics/terrascan/pull/496) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump github.com/hashicorp/go-getter from 1.5.1 to 1.5.2 [\#495](https://github.com/accurics/terrascan/pull/495) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v1.3.0](https://github.com/accurics/terrascan/tree/v1.3.0) (2021-01-19) [Full Changelog](https://github.com/accurics/terrascan/compare/v1.2.0...v1.3.0) @@ -242,3 +269,6 @@ Major updates to Terrascan and the underlying architecture including: - First release on PyPI. \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* + + +\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* From 372796ab2401fd285cf4fb008a6302d8a80a08d7 Mon Sep 17 00:00:00 2001 From: amirbenv <74685902+amirbenv@users.noreply.github.com> Date: Fri, 22 Jan 2021 13:25:40 -0800 Subject: [PATCH 3/4] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75f76c4b2..8f79fd11e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,12 @@ **Implemented enhancements:** +- Support for remote modules - Tag container image with release version [\#504](https://github.com/accurics/terrascan/issues/504) **Fixed bugs:** -- Terrascan 1.3.0 fails to build on alpine [\#506](https://github.com/accurics/terrascan/issues/506) +- Build error on ARM MacOS - terrascan consider source = "terraform-aws-modules/vpc/aws" as local path [\#418](https://github.com/accurics/terrascan/issues/418) - Failed to read module directory [\#332](https://github.com/accurics/terrascan/issues/332) From cde0357bfa4878175716e6528ff96200fcd7c256 Mon Sep 17 00:00:00 2001 From: Cesar Rodriguez Date: Fri, 22 Jan 2021 16:30:25 -0500 Subject: [PATCH 4/4] updates docs with 1.3.1 version --- README.md | 6 +++--- docs/getting-started/quickstart.md | 6 +++--- docs/getting-started/usage.md | 12 +----------- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index a20c8d04a..07912ddf4 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Terrascan's supports multiple ways to install, including [brew](https://github.c Here, we will download the terrascan binary directly from the [releases](https://github.com/accurics/terrascan/releases) page. Make sure to select the right binary for your machine. Here's an example of how to install it: ```sh -$ curl --location https://github.com/accurics/terrascan/releases/download/v1.3.0/terrascan_1.3.0_Darwin_x86_64.tar.gz --output terrascan.tar.gz +$ curl --location https://github.com/accurics/terrascan/releases/download/v1.3.1/terrascan_1.3.1_Darwin_x86_64.tar.gz --output terrascan.tar.gz $ tar -xvf terrascan.tar.gz x CHANGELOG.md x LICENSE @@ -85,7 +85,7 @@ In Terraform scripts, you can tell terrascan to skip rules by inserting a commen ![tf](https://user-images.githubusercontent.com/74685902/105115888-847b8a00-5a7e-11eb-983e-7f49f7c36ae1.png) -### Kubernetes +### Kubernetes In Kubernetes yamls, you can tell terrascan to skip rules by adding an annotation as seen in the snippet below. ![k8s](https://user-images.githubusercontent.com/74685902/105115885-834a5d00-5a7e-11eb-9190-e8b64d77c5ac.png) @@ -135,7 +135,7 @@ RUN apk add --update git RUN git clone https://github.com/accurics/terrascan && cd terrascan \ && CGO_ENABLED=0 GO111MODULE=on go build -o /go/bin/terrascan cmd/terrascan/main.go - + ``` diff --git a/docs/getting-started/quickstart.md b/docs/getting-started/quickstart.md index 3f4bde496..502f2c647 100644 --- a/docs/getting-started/quickstart.md +++ b/docs/getting-started/quickstart.md @@ -11,10 +11,10 @@ Terrascan is a portable executable that does not strictly require installation, Terrascan's [release page](https://github.com/accurics/terrascan/releases) includes builds for common platforms. Just download and extract the package for your platform. For example, if you use a Mac you might do this: ``` Bash -$ curl --location https://github.com/accurics/terrascan/releases/download/v1.3.0/terrascan_1.3.0_Darwin_x86_64.tar.gz --output terrascan.tar.gz +$ curl --location https://github.com/accurics/terrascan/releases/download/v1.3.1/terrascan_1.3.1_Darwin_x86_64.tar.gz --output terrascan.tar.gz $ tar xzf terrascan.tar.gz $ ./terrascan version -version: v1.3.0 +version: v1.3.1 ``` If you want to use this executable for the rest of this quickstart, it will help to create an alias or install the executable onto your path. For example with bash you could do something like this: @@ -34,7 +34,7 @@ Terrascan is also available as a Docker image in Docker Hub and can be used as f ``` Bash $ docker run --rm accurics/terrascan version -version: v1.3.0 +version: v1.3.1 ``` If you want to use the Docker image for the rest of this quickstart, it will help to create an alias, script or batch file that reduces the typing necessary. For example with bash you could do something like this: diff --git a/docs/getting-started/usage.md b/docs/getting-started/usage.md index deaef3d85..e464ba39d 100644 --- a/docs/getting-started/usage.md +++ b/docs/getting-started/usage.md @@ -5,7 +5,7 @@ Terrascan is a static code analyzer for Infrastructure as Code tooling. It can e Terrascan's binary can be found on the package for each [release](https://github.com/accurics/terrascan/releases). Here's an example of how to install it: ``` Bash -$ curl --location https://github.com/accurics/terrascan/releases/download/v1.3.0/terrascan_1.3.0_Darwin_x86_64.tar.gz --output terrascan.tar.gz +$ curl --location https://github.com/accurics/terrascan/releases/download/v1.3.1/terrascan_1.3.1_Darwin_x86_64.tar.gz --output terrascan.tar.gz $ tar -xvf terrascan.tar.gz x CHANGELOG.md x LICENSE @@ -15,16 +15,6 @@ $ install terrascan /usr/local/bin $ terrascan ``` -If you have go installed, Terrascan can be installed with `go get` -``` -$ export GO111MODULE=on -$ go get -u github.com/accurics/terrascan/cmd/terrascan - go: downloading github.com/accurics/terrascan v1.3.0 - go: found github.com/accurics/terrascan/cmd/terrascan in github.com/accurics/terrascan v1.3.0 - ... -$ terrascan -``` - ### Using Docker Terrascan is available as a Docker image and can used as follows: