Skip to content

Commit

Permalink
Merge pull request #96 from aztfmod/AL-dec-update
Browse files Browse the repository at this point in the history
December Update
  • Loading branch information
LaurentLesle authored Dec 11, 2020
2 parents 4e3141b + 09a68c6 commit 4098ce3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
version: '3.7'
services:
rover:
image: aztfmod/rover:2011.3012
image: aztfmod/roverdev:2012.100915
user: vscode

labels:
Expand Down
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ versionTfsec=v0.27.0
versionTerraformDocs=v0.10.1
versionAnsible=2.9.13
versionPacker=1.6.4
versionTerraformCloudAgent=0.1.5
7 changes: 0 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
20 changes: 14 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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
Expand All @@ -66,6 +66,7 @@ ARG versionDockerCompose
ARG versionTfsec
ARG versionAnsible
ARG versionPacker
ARG versionTerraformCloudAgent

ARG USERNAME=vscode
ARG USER_UID=1000
Expand All @@ -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 \
Expand All @@ -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 && \
#
Expand All @@ -124,12 +124,20 @@ RUN yum -y install \
#
# Install Terraform
#
echo "Installing terraform ${versionTerraform}..." && \
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 && \
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}..." && \
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ services:
rover:

container_name: rover
build:

build:
context: .
dockerfile: Dockerfile
args:
Expand All @@ -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"

command: /bin/sh -c "while sleep 1000; do :; done"

0 comments on commit 4098ce3

Please sign in to comment.