Skip to content

Commit

Permalink
Upgrade terraform + add ovh plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Yves Heitz committed Mar 10, 2020
1 parent 325e0e5 commit 21dda69
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
28 changes: 22 additions & 6 deletions elao.infra/.manala/docker/Dockerfile.terraform.tmpl
Original file line number Diff line number Diff line change
@@ -1,21 +1,37 @@
FROM golang:alpine3.9 AS provider-openstack

RUN apk add --no-cache git \
&& go get -d -v github.com/terraform-providers/terraform-provider-openstack \
&& git -C ./src/github.com/terraform-providers/terraform-provider-openstack checkout v1.24.0 \
&& go install ./src/github.com/terraform-providers/terraform-provider-openstack
&& go get -d -v github.com/terraform-providers/terraform-provider-openstack \
&& git -C ./src/github.com/terraform-providers/terraform-provider-openstack checkout v1.26.0 \
&& go install ./src/github.com/terraform-providers/terraform-provider-openstack

FROM golang:alpine3.9 AS provider-gandi

RUN apk add --no-cache git make bash \
&& git clone https://github.com/tiramiseb/terraform-provider-gandi.git \
&& git -C ./terraform-provider-gandi checkout v1.1.1 \
&& cd terraform-provider-gandi/ && make -f GNUmakefile build
&& git clone https://github.com/tiramiseb/terraform-provider-gandi.git \
&& git -C ./terraform-provider-gandi checkout v1.1.1 \
&& cd terraform-provider-gandi/ && make -f GNUmakefile build

FROM golang:alpine3.9 AS provider-ovh

RUN apk add --no-cache git make bash \
&& git clone https://github.com/terraform-providers/terraform-provider-ovh.git \
&& git -C ./terraform-provider-ovh checkout v0.7.0 \
&& cd terraform-provider-ovh/ && make build

FROM golang:alpine3.9 AS provider-template

RUN apk add --no-cache git \
&& go get -d -v github.com/terraform-providers/terraform-provider-template \
&& git -C ./src/github.com/terraform-providers/terraform-provider-template checkout v2.1.2 \
&& go install ./src/github.com/terraform-providers/terraform-provider-template

FROM hashicorp/terraform:{{ .Vars.system.terraform.version }}

COPY --from=provider-openstack /go/bin/terraform-provider-openstack /bin
COPY --from=provider-gandi /go/bin/terraform-provider-gandi /bin
COPY --from=provider-ovh /go/bin/terraform-provider-ovh /bin
COPY --from=provider-template /go/bin/terraform-provider-template /bin

RUN apk add --no-cache zsh
RUN sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Expand Down
3 changes: 2 additions & 1 deletion elao.infra/.manala/docker/docker-compose.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ services:
context: .
dockerfile: Dockerfile.terraform
environment:
OVH_PC:
OVH_PROJECT:
OVH_PROJECT_ID:
OS_TOKEN:
AWS_SESSION_TOKEN:
AWS_ACCESS_KEY_ID: AKIARXWTWAJ4KAGCSOR7
Expand Down
1 change: 1 addition & 0 deletions elao.infra/.manala/docker/etc/terraform/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ plugins=(git terraform)
source $ZSH/oh-my-zsh.sh

alias tf="/bin/terraform"
PROMPT='%a${OVH_PROJECT:-"Unauthenticated"}@%F{yellow}terraform%f%b:%F{blue}%B%~%b%f '

0 comments on commit 21dda69

Please sign in to comment.