From ff79110b854ad245c6c7ada3a2e79fc4fb6838d3 Mon Sep 17 00:00:00 2001 From: Andrew Bobulsky Date: Fri, 20 Apr 2018 14:22:58 -0400 Subject: [PATCH 1/2] Use go get to download the module --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9330ad1f..c903c013 100644 --- a/README.md +++ b/README.md @@ -28,18 +28,16 @@ resource "mongodbatlas_cluster" "test" { Also look at the example under [/examples](/examples). ## Building the Provider -Clone repository to: `$GOPATH/src/github.com/akshaykarle/terraform-provider-mongodbatlas` +Clone and build the repository ```sh -$ mkdir -p $GOPATH/src/github.com/akshaykarle; cd $GOPATH/src/github.com/akshaykarle -$ git clone git@github.com:akshaykarle/terraform-provider-mongodbatlas +go get github.com/akshaykarle/terraform-provider-mongodbatlas ``` -Enter the provider directory and build the provider +Symlink the binary to your terraform plugins directory: ```sh -$ cd $GOPATH/src/github.com/akshaykarle/terraform-provider-mongodbatlas -$ make build +ln -s $GOPATH/bin/terraform-provider-mongodbatlas ~/.terraform.d/plugins/ ``` ## NOTE From a1150ba6a0db96eac3e9a4057a6ccf99ed38126a Mon Sep 17 00:00:00 2001 From: Andrew Bobulsky Date: Sun, 6 May 2018 14:44:11 -0400 Subject: [PATCH 2/2] Added build step back in, added update section Due to a cached build on my test machine and a general lack of golang knowledge, I didn't specify the steps correctly but had the infamous "works on my machine" kind of result. I've tested these ones better by clearing out all traces of the module between runs. --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index c903c013..b8e6afc0 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ Clone and build the repository ```sh go get github.com/akshaykarle/terraform-provider-mongodbatlas +go build github.com/akshaykarle/terraform-provider-mongodbatlas ``` Symlink the binary to your terraform plugins directory: @@ -40,5 +41,12 @@ Symlink the binary to your terraform plugins directory: ln -s $GOPATH/bin/terraform-provider-mongodbatlas ~/.terraform.d/plugins/ ``` +## Updating the Provider + +```sh +go get -u github.com/akshaykarle/terraform-provider-mongodbatlas +go build github.com/akshaykarle/terraform-provider-mongodbatlas +``` + ## NOTE The `mongodbatlas_project` and `mongodbatlas_container` resources do not destroy the project or container (vpc) in mongo atlas. This due to limitation of the mongo atlas API as it doesn't support deleting these resources.