From 3b0629871330ccd81a8a1e01eff0addb3240aa16 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 4 Dec 2020 06:44:02 +0000 Subject: [PATCH 01/11] Bump golang from 1.13 to 1.15.6 Bumps golang from 1.13 to 1.15.6. Signed-off-by: dependabot-preview[bot] --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9343d6bd..f829b873 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,7 @@ RUN yum makecache fast && \ ########################################################### # Getting latest version of terraform-docs ########################################################### -FROM golang:1.13 as terraform-docs +FROM golang:1.15.6 as terraform-docs ARG versionTerraformDocs ENV versionTerraformDocs=${versionTerraformDocs} @@ -44,7 +44,7 @@ RUN GO111MODULE="on" go get github.com/terraform-docs/terraform-docs@${versionTe ########################################################### # Getting latest version of tfsec ########################################################### -FROM golang:1.13 as tfsec +FROM golang:1.15.6 as tfsec # to force the docker cache to invalidate when there is a new version RUN env GO111MODULE=on go get -u github.com/tfsec/tfsec/cmd/tfsec From cff5b52ea8491751a500def04d68d79c7414e6c9 Mon Sep 17 00:00:00 2001 From: Arnaud Lheureux Date: Wed, 9 Dec 2020 10:33:33 +0000 Subject: [PATCH 02/11] Adding remoteuser --- .devcontainer/devcontainer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d8dfd7a8..8739e263 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,6 +6,7 @@ // Container user to use in VSCode Online and GitHub Codespaces "containerUser" : "vscode", + "remoteUser" : "vscode", // The 'service' property is the name of the service for the container that VS Code should // use. Update this value and .devcontainer/docker-compose.yml to the real service name. From e7f3a40d54d09fcbe74e3a56a5e5962afa6af5df Mon Sep 17 00:00:00 2001 From: Arnaud Lheureux Date: Wed, 9 Dec 2020 10:49:18 +0000 Subject: [PATCH 03/11] volume mount --- .devcontainer/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index e4bdd3b1..c9f617cb 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -14,7 +14,7 @@ volumes: - ..:/tf/rover - - volume-caf-vscode:/home/vscode + - volume-caf-vscode:~ - ~/.ssh:/tmp/.ssh-localhost:ro - /var/run/docker.sock:/var/run/docker.sock From 2411709252881a267ae72939417262db9e0b3ecb Mon Sep 17 00:00:00 2001 From: Arnaud Lheureux Date: Wed, 9 Dec 2020 10:53:25 +0000 Subject: [PATCH 04/11] Reverting volume --- .devcontainer/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index c9f617cb..e4bdd3b1 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -14,7 +14,7 @@ volumes: - ..:/tf/rover - - volume-caf-vscode:~ + - volume-caf-vscode:/home/vscode - ~/.ssh:/tmp/.ssh-localhost:ro - /var/run/docker.sock:/var/run/docker.sock From ab23c35459e4065222da56d876c6ec945c13a17e Mon Sep 17 00:00:00 2001 From: Arnaud Lheureux Date: Thu, 10 Dec 2020 03:06:11 +0000 Subject: [PATCH 05/11] Fixing Git path --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f829b873..6d9056f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -106,7 +106,7 @@ RUN yum -y install \ curl -sSL -o /tmp/git.tar.gz https://www.kernel.org/pub/software/scm/git/git-${versionGit}.tar.gz && \ tar xvf /tmp/git.tar.gz -C /tmp && \ cd /tmp/git-${versionGit} && \ - ./configure --exec-prefix="/usr" && \ + ./configure --exec-prefix="/usr/local" && \ make -j && \ make install && \ # From fa852f37cb80dce018670f9af2b80ade691f9554 Mon Sep 17 00:00:00 2001 From: Arnaud Lheureux Date: Thu, 10 Dec 2020 04:12:50 +0000 Subject: [PATCH 06/11] testing with alpha --- .devcontainer/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index e4bdd3b1..858ddb90 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -6,7 +6,7 @@ version: '3.7' services: rover: - image: aztfmod/rover:2011.3012 + image: aztfmod/roveralpha:2012.100344 user: vscode labels: From 2890920d10967ae9fed2bc0add3c8a8099256d01 Mon Sep 17 00:00:00 2001 From: Arnaud Lheureux Date: Thu, 10 Dec 2020 06:26:24 +0000 Subject: [PATCH 07/11] Adding initial support for Terraform Cloud Agent --- .env | 1 + Dockerfile | 14 +++++++++++--- docker-compose.yml | 8 ++++---- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.env b/.env index a09a29d7..709890a4 100644 --- a/.env +++ b/.env @@ -9,3 +9,4 @@ versionTfsec=v0.27.0 versionTerraformDocs=v0.10.1 versionAnsible=2.9.13 versionPacker=1.6.4 +versionTerraformCloudAgent=0.1.5 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 6d9056f9..927fb259 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,6 +66,7 @@ ARG versionDockerCompose ARG versionTfsec ARG versionAnsible ARG versionPacker +ARG versionTerraformCloudAgent ARG USERNAME=vscode ARG USER_UID=1000 @@ -84,11 +85,10 @@ ENV SSH_PASSWD=${SSH_PASSWD} \ versionTfsec=${versionTfsec} \ versionAnsible=${versionAnsible} \ versionPacker=${versionPacker} \ + versionTerraformCloudAgent=${versionTerraformCloudAgent} \ TF_DATA_DIR="/home/${USERNAME}/.terraform.cache" \ TF_PLUGIN_CACHE_DIR="/home/${USERNAME}/.terraform.cache/plugin-cache" - - RUN yum -y install \ make \ zlib-devel \ @@ -124,12 +124,20 @@ RUN yum -y install \ # # Install Terraform # - echo "Installing terraform ${versionTerraform}..." && \ + echo "Installing Terraform ${versionTerraform} ${versionTerraformCloudAgent} ..." && \ curl -sSL -o /tmp/terraform.zip https://releases.hashicorp.com/terraform/${versionTerraform}/terraform_${versionTerraform}_linux_amd64.zip 2>&1 && \ unzip -d /usr/bin /tmp/terraform.zip && \ chmod +x /usr/bin/terraform && \ mkdir -p /home/${USERNAME}/.terraform.cache/plugin-cache && \ # + # Install Terraform Cloud Agents + # + echo "Installing Terraform Cloud Agents ${versionTerraformCloudAgent}..." && \ + curl -sSL -o /tmp/tfc-agent.zip https://releases.hashicorp.com/tfc-agent/${versionTerraformCloudAgent}/tfc-agent_${versionTerraformCloudAgent}_linux_amd64.zip 2>&1 && \ + unzip -d /usr/bin /tmp/tfc-agent.zip && \ + chmod +x /usr/bin/tfc-agent && \ + chmod +x /usr/bin/tfc-agent-core && \ + # # Install Packer # echo "Installing Packer ${versionPacker}..." && \ diff --git a/docker-compose.yml b/docker-compose.yml index c038dfbb..493ce1c1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,8 +8,8 @@ services: rover: container_name: rover - - build: + + build: context: . dockerfile: Dockerfile args: @@ -25,11 +25,11 @@ services: - versionTerraformDocs - versionAnsible - versionPacker + - versionTerraformCloudAgent volumes: - ..:/tf # Overrides default command so things don't shut down after the process ends. - command: /bin/sh -c "while sleep 1000; do :; done" - \ No newline at end of file + command: /bin/sh -c "while sleep 1000; do :; done" From 28dd966d6a82e476c1b4ae14e9e269f12e5edaad Mon Sep 17 00:00:00 2001 From: Arnaud Lheureux Date: Thu, 10 Dec 2020 06:27:44 +0000 Subject: [PATCH 08/11] Updating rover alpha --- .devcontainer/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 858ddb90..6551eca0 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -6,7 +6,7 @@ version: '3.7' services: rover: - image: aztfmod/roveralpha:2012.100344 + image: aztfmod/roveralpha:2012.100627 user: vscode labels: From 4b90ef405c40dda8e2ee2a0ae65d06a72ff2629d Mon Sep 17 00:00:00 2001 From: Arnaud Lheureux Date: Thu, 10 Dec 2020 06:39:01 +0000 Subject: [PATCH 09/11] Removing TF pre-commit --- .pre-commit-config.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1851272c..fb9d4014 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,6 @@ # See http://pre-commit.com for more information # See http://pre-commit.com/hooks.html for more hooks repos: - - repo: git://github.com/antonbabenko/pre-commit-terraform - rev: v1.43.0 - hooks: - - id: terraform_fmt - # - id: terraform_docs - # - id: terraform_tflint - # - id: terraform_tfsec - repo: git://github.com/pre-commit/pre-commit-hooks rev: v3.3.0 hooks: From 63752b5fa7fe7f66ef69ed2b782cafcbe564062f Mon Sep 17 00:00:00 2001 From: Arnaud Lheureux Date: Thu, 10 Dec 2020 17:14:46 +0800 Subject: [PATCH 10/11] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 927fb259..3534a633 100644 --- a/Dockerfile +++ b/Dockerfile @@ -124,7 +124,7 @@ RUN yum -y install \ # # Install Terraform # - echo "Installing Terraform ${versionTerraform} ${versionTerraformCloudAgent} ..." && \ + echo "Installing Terraform ${versionTerraform}..." && \ curl -sSL -o /tmp/terraform.zip https://releases.hashicorp.com/terraform/${versionTerraform}/terraform_${versionTerraform}_linux_amd64.zip 2>&1 && \ unzip -d /usr/bin /tmp/terraform.zip && \ chmod +x /usr/bin/terraform && \ From 09a68c6e6122ee0656d3e413f068d7a25d5c2f71 Mon Sep 17 00:00:00 2001 From: lolorol Date: Fri, 11 Dec 2020 17:17:47 +0800 Subject: [PATCH 11/11] Update rover docker compose --- .devcontainer/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 6551eca0..ff56b538 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -6,7 +6,7 @@ version: '3.7' services: rover: - image: aztfmod/roveralpha:2012.100627 + image: aztfmod/roverdev:2012.100915 user: vscode labels: