From ef80ea2a4b135f59944049cb745d927cee9a2989 Mon Sep 17 00:00:00 2001 From: Ming Fang Date: Sun, 24 Jan 2021 15:12:55 -0500 Subject: [PATCH] upgrade to terraform v0.14.5 --- Dockerfile | 2 +- dev | 1 + dev.tfrc | 8 ++++++++ make | 8 +++++--- 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 dev.tfrc diff --git a/Dockerfile b/Dockerfile index 66b992e..4c24d5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,7 @@ ENV GO111MODULE=on # XC_OS=linux XC_ARCH=amd64 make bin #RUN mv /go/bin/terraform /usr/local/bin/terraform -RUN wget https://releases.hashicorp.com/terraform/0.13.5/terraform_0.13.5_linux_amd64.zip && \ +RUN wget https://releases.hashicorp.com/terraform/0.14.5/terraform_0.14.5_linux_amd64.zip && \ unzip *.zip && \ mv terraform /usr/local/bin && \ rm *.zip diff --git a/dev b/dev index c64e077..7d00380 100755 --- a/dev +++ b/dev @@ -5,6 +5,7 @@ docker build --pull --target dev --tag "${IMAGE}:dev" $@ . docker run --rm -p 8000:8000 \ -e KUBECONFIG=/kubeconfig \ + -e TF_CLI_CONFIG_FILE=/go/src/github.com/mingfang/terraform-provider-k8s/dev.tfrc \ -v /mnt/ceph/docker-kubernetes-master/vault-data/cluster-admin-kubeconfig.yml:/kubeconfig \ -v `pwd`:/go/src/github.com/mingfang/terraform-provider-k8s \ -v `pwd`/../terraform-k8s-modules:/go/src/github.com/mingfang/terraform-provider-k8s/modules \ diff --git a/dev.tfrc b/dev.tfrc new file mode 100644 index 0000000..27f5cd7 --- /dev/null +++ b/dev.tfrc @@ -0,0 +1,8 @@ +provider_installation { + + dev_overrides { + "mingfang/k8s" = "/root/.terraform.d/plugins/mingfang/k8s/0.0.0/linux_amd64" + } + + direct {} +} diff --git a/make b/make index 573e1ae..083de0d 100755 --- a/make +++ b/make @@ -1,5 +1,7 @@ clear -rm /usr/local/bin/terraform-provider-k8s* -go build -o /usr/local/bin/terraform-provider-k8s_v1.0.0 -ln -s -f /usr/local/bin/terraform-provider-k8s_v1.0.0 /go/bin/terraform-provider-k8s_v1.0.0 +rm -r ~/.terraform.d +DIR=~/.terraform.d/plugins/mingfang/k8s/0.0.0/linux_amd64 +mkdir -p $DIR + +go build -o $DIR/terraform-provider-k8s terraform init