Skip to content

Instantly share code, notes, and snippets.

@cejkyle
cejkyle / gist:b1fb9b9a739a365ef033f3fc840ca269
Last active November 4, 2020 10:29
create terraform docker container
# build step to create a Terraform bundle per our included terraform-bundle.hcl
FROM golang:alpine AS terraformbundler
ENV TERRAVER=v0.12.16
RUN apk --update add git unzip openssh-client && \
go get -d -v github.com/hashicorp/terraform && \
git -C ./src/github.com/hashicorp/terraform checkout $TERRAVER && \
go install ./src/github.com/hashicorp/terraform/tools/terraform-bundle
COPY terraform-bundle.hcl .
# build step to create a Terraform bundle per our included terraform-bundle.hcl
FROM golang:alpine AS terraformbundler
ENV TERRAVER=v0.12.16
RUN apk --update add git unzip openssh-client && \
go get -d -v github.com/hashicorp/terraform && \
git -C ./src/github.com/hashicorp/terraform checkout $TERRAVER && \
go install ./src/github.com/hashicorp/terraform/tools/terraform-bundle