forked from alphagov/paas-docker-cloudfoundry-tools
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from orange-cloudfoundry/orange-terraform-custo
Orange terraform custo
- Loading branch information
Showing
7 changed files
with
118 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.2.3 | ||
2.3.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,58 @@ | ||
FROM alpine:3.4 | ||
FROM alpine:3.7 | ||
|
||
ENV PATH $PATH:/usr/local/bin | ||
ENV TERRAFORM_VER 0.8.5 | ||
ENV TERRAFORM_SUM 4b4324e354c26257f0b830eacb0e7cc7e2ced017d78855f74cb9377f1abf1dd7 | ||
ENV TERRAFORM_SHARED_DIR /root/.terraform.d/plugins/linux_amd64 | ||
ENV TERRAFORM_VER 0.11.2 | ||
ENV TERRAFORM_SUM f728fa73ff2a4c4235a28de4019802531758c7c090b6ca4c024d48063ab8537b | ||
ENV TERRAFORM_ZIP terraform_${TERRAFORM_VER}_linux_amd64.zip | ||
|
||
RUN apk add --update openssl openssh-client ca-certificates && rm -rf /var/cache/apk/* | ||
|
||
ENV PROVIDER_CLOUDFOUNDRY_VERSION 0.9.1 | ||
#ENV PROVIDER_CLOUDFOUNDRY_SUM TODO-xxx | ||
|
||
ENV PROVIDER_CREDHUB_VERSION 0.10.0 | ||
#ENV PROVIDER_CREDHUB_SUM TODO-yyy | ||
|
||
|
||
RUN mkdir -p ${TERRAFORM_SHARED_DIR} | ||
|
||
RUN apk add --update openssl openssh-client ca-certificates wget && rm -rf /var/cache/apk/* | ||
|
||
|
||
RUN set -ex \ | ||
&& wget https://releases.hashicorp.com/terraform/${TERRAFORM_VER}/${TERRAFORM_ZIP} -O /tmp/${TERRAFORM_ZIP} \ | ||
&& echo "${TERRAFORM_SUM} /tmp/${TERRAFORM_ZIP}" | sha256sum -c - \ | ||
&& unzip /tmp/${TERRAFORM_ZIP} -d /usr/local/bin \ | ||
&& rm /tmp/${TERRAFORM_ZIP} | ||
|
||
|
||
# Terraform CF provider name is not version dependant | ||
RUN set -ex \ | ||
&& export FILENAME="terraform-provider-cloudfoundry" \ | ||
&& export FILENAME_SUFFIX="_0.10_linux_amd64" \ | ||
&& export FULL_FILENAME="$FILENAME$FILENAME_SUFFIX" \ | ||
&& export URL="https://github.com/orange-cloudfoundry/terraform-provider-cloudfoundry/releases/download/v${PROVIDER_CLOUDFOUNDRY_VERSION}/${FULL_FILENAME}" \ | ||
&& export SUM=${PROVIDER_CLOUDFOUNDRY_SUM} \ | ||
&& wget ${URL} -O /tmp/${FULL_FILENAME} \ | ||
&& mv /tmp/${FULL_FILENAME} ${TERRAFORM_SHARED_DIR}/${FILENAME} \ | ||
&& chmod +x ${TERRAFORM_SHARED_DIR}/* | ||
# && echo "${SUM} /tmp/${FILENAME}" | sha256sum -c - \ | ||
|
||
# Terraform Credhub provider name is not version dependant | ||
RUN set -ex \ | ||
&& export FILENAME="terraform-provider-credhub" \ | ||
&& export FILENAME_SUFFIX="_0.10_linux_amd64" \ | ||
&& export FULL_FILENAME="$FILENAME$FILENAME_SUFFIX" \ | ||
&& export URL="https://github.com/orange-cloudfoundry/terraform-provider-credhub/releases/download/v${PROVIDER_CREDHUB_VERSION}/${FULL_FILENAME}" \ | ||
&& export SUM=${PROVIDER_CREDHUB_SUM} \ | ||
&& wget ${URL} -O /tmp/${FULL_FILENAME} \ | ||
&& mv /tmp/${FULL_FILENAME} ${TERRAFORM_SHARED_DIR}/${FILENAME} \ | ||
&& chmod +x ${TERRAFORM_SHARED_DIR}/* | ||
# && echo "${SUM} /tmp/${FILENAME}" | sha256sum -c - \ | ||
|
||
|
||
ENV TF_DATA_DIR "/root/.terraform.d" | ||
COPY plugin_cache.tf /tmp/ | ||
RUN cd /tmp && terraform init | ||
|
||
ENV TF_INPUT 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
provider "terraform" {version = "~> 1.0.2"} | ||
provider "openstack" {version = "~> 1.1.0"} | ||
provider "cloudflare" {version = "~> 0.1.0"} | ||
provider "local" { version = "~> 1.0.0"} | ||
provider "powerdns" {version = "~> 0.1.0"} | ||
|
||
# Orange provider | ||
provider "credhub" {} | ||
provider "cloudfoundry" {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters