From 7a877adc553ace7b6318e667864ee7170cc3488f Mon Sep 17 00:00:00 2001 From: Sriharsha Tikkireddy Date: Fri, 3 Apr 2020 15:49:11 -0400 Subject: [PATCH] updated dependancies and fixed dependancies to point to databricks labs, and added quickstart tutorial to install the provider --- README.md | 180 +++++++++++++----- client/client.go | 1 + client/model/token.go | 11 -- client/service/api.go | 7 +- client/service/clusters.go | 2 +- client/service/clusters_integration_test.go | 2 +- client/service/groups.go | 2 +- client/service/instance_pools.go | 2 +- .../instance_pools_integration_test.go | 2 +- client/service/instance_pools_test.go | 2 +- client/service/main_test.go | 2 +- client/service/secret_acls.go | 2 +- client/service/secret_acls_test.go | 2 +- client/service/secret_scopes.go | 2 +- client/service/secret_scopes_test.go | 2 +- client/service/secrets.go | 2 +- .../secrets_scopes_acls_integration_test.go | 2 +- client/service/secrets_test.go | 2 +- client/service/tokens.go | 2 +- client/service/users.go | 2 +- client/service/users_integration_test.go | 2 +- db/azure_ws_init.go | 4 +- db/azure_ws_init_test.go | 4 +- db/provider.go | 4 +- db/resource_db_instance_pool.go | 4 +- db/resource_db_scim_group.go | 4 +- db/resource_db_scim_group_test.go | 16 -- db/resource_db_scim_user.go | 4 +- db/resource_db_secret.go | 2 +- db/resource_db_secret_acl.go | 4 +- db/resource_db_secret_scope.go | 2 +- db/resource_db_token.go | 2 +- db/resource_db_token_test.go | 4 +- docs/source/provider/installation.md | 13 +- go.mod | 2 +- main.go | 2 +- 36 files changed, 188 insertions(+), 116 deletions(-) diff --git a/README.md b/README.md index 8ddbe54b94..f18f63ae29 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,127 @@ # Databricks Terraform Provider ## Table Of Contents - * [Getting Started](#getting-started) - * [Project Components](#project-components) - + [High Level Databricks Client CR[U]D](#high-level-databricks-client-cr-u-d) - - [Clusters](#clusters) - - [Libraries](#libraries) - - [Jobs API](#jobs-api) - - [Secrets](#secrets) - * [Secret Scope](#secret-scope) - * [Secret](#secret) - * [Secret ACL](#secret-acl) - - [Token API](#token-api) - - [Workspace (Notebooks) API](#workspace--notebooks--api) - - [SCIM API](#scim-api) - * [Users](#users) - * [Groups](#groups) - * [Group Member](#group-member) - * [Group entitlements](#group-entitlements) - - [MLFlow API](#mlflow-api) - - [Instance Profiles API (AWS Only)](#instance-profiles-api--aws-only-) - - [DBFS](#dbfs) - + [Databricks terraform provider resources](#databricks-terraform-provider-resources) - * [Testing](#testing) - * [Project Support](#project-support) - * [Building the Project](#building-the-project) - * [Deploying / Installing the Project](#deploying---installing-the-project) - * [Releasing the Project](#releasing-the-project) - * [Using the Project](#using-the-project) - + +- [*Quickstart*: Building and Using the Provider](#-quickstart---building-and-using-the-provider) + * [Setup](#setup) + * [Downloading the source code and installing the artifact](#downloading-the-source-code-and-installing-the-artifact) + * [Basic Terraform example](#basic-terraform-example) +- [Project Components](#project-components) + * [High Level Databricks Client CR[U]D](#high-level-databricks-client-cr-u-d) + + [Clusters](#clusters) + + [Libraries](#libraries) + + [Jobs API](#jobs-api) + + [Secrets](#secrets) + - [Secret Scope](#secret-scope) + - [Secret](#secret) + - [Secret ACL](#secret-acl) + + [Token API](#token-api) + + [Workspace (Notebooks) API](#workspace--notebooks--api) + + [SCIM API](#scim-api) + - [Users](#users) + - [Groups](#groups) + - [Group Member](#group-member) + + [Instance Profiles API (AWS Only)](#instance-profiles-api--aws-only-) + + [DBFS](#dbfs) + * [Databricks terraform provider resources](#databricks-terraform-provider-resources) +- [Testing](#testing) +- [Project Support](#project-support) +- [Building the Project](#building-the-project) +- [Deploying / Installing the Project](#deploying---installing-the-project) +- [Releasing the Project](#releasing-the-project) +- [Using the Project](#using-the-project) + + -## Getting Started +## *Quickstart*: Building and Using the Provider + +### Setup + Please note that there is a Makefile which contains all the commands you would need to run this project. This code base to contribute to requires the following software: -* golang 1.13.X +* [golang 1.13.X](https://golang.org/dl/) +* [terraform v0.12.x](https://www.terraform.io/downloads.html) +* make command + +To make sure everything is installed correctly please run the following commands: + +Testing go installation: +```bash +$ python --version +go version go1.13.3 darwin/amd64 +``` + +Testing terraform installation: +```bash +$ terraform --version +Terraform v0.12.19 + +Your version of Terraform is out of date! The latest version +is 0.12.24. You can update by downloading from https://www.terraform.io/downloads.html + +``` + +Testing make installation: +```bash +$ make --version +GNU Make 3.81 +Copyright (C) 2006 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. +There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. + +This program built for i386-apple-darwin11.3.0 +``` + +### Downloading the source code and installing the artifact + +* After installing `golang`, `terraform`, and `make` you will now build the artifact. + +```bash +$ go get -u github.com/databrickslabs/databricks-terraform && $ cd $GOPATH/src/github.com/databrickslabs/databricks-terraform +``` + +* When you are in the root directory of the repository please run: + +```bash +$ make build +``` + +* Locate your [terraform plugins directory](https://www.terraform.io/docs/extend/how-terraform-works.html#plugin-locations) + or the root folder of your terraform code -* python 3.6.X +* Copy the `terraform-provider-db` artifact to that terraform plugins locations + +```bash +$ mkdir -p ~/.terraform.d/plugins/ && cp terraform-provider-db ~/.terraform.d/plugins/terraform-provider-db +``` + +Now your plugin for the Databricks Terraform provider is installed correctly. You can actually use the provider. + +### Basic Terraform example + +Sample terraform code + +```hcl-terraform +provider "db" { + host = "http://databrickshost.com" + token = "dapitokenhere" +} + +// Creating a basic user +resource "db_scim_user" "my-user" { + user_name = join("", ["test-user", "+",count.index,"@databricks.com"]) + display_name = "Test User" +} +``` + +Then run `terraform init` then `terraform apply` to apply the hcl code to your databricks workspace. + +Please refer to the detailed documentation provided in the html documentation for detailed use of the providers. + +Also refer to these [examples](examples/) for more scenarios. ## Project Components @@ -45,7 +129,13 @@ This code base to contribute to requires the following software: The client folder contains all the code for the golang sdk for the Databricks REST API. It is kept separate from the databricks terraform provider with its own unit/integration tests. The client so far supports the following: #### Clusters -TODO! +* [ ] Create cluster + +* [ ] Get cluster + +* [ ] Update cluster + +* [ ] Delete cluster #### Libraries * [ ] Create Library Installation @@ -57,7 +147,13 @@ TODO! > Note: All library manipulation for clusters must be performed when the cluster is in a running state. #### Jobs API -TODO! +* [ ] Create job + +* [ ] Get job + +* [ ] Update job + +* [ ] Delete job Instance Pools * [x] Create Instance Pools @@ -130,12 +226,6 @@ Note: For updating a user use Patch for entitlements, Put for everything else. W * [x] Delete Member -##### Group entitlements -TBD! - -#### MLFlow API -TBD! - #### Instance Profiles API (AWS Only) * [ ] Create IAM Instance Profile Link @@ -161,15 +251,17 @@ TBD! * [x] Secret scopes * [x] Secrets * [x] Secret acls -* [ ] Clusters -* [ ] Cluster Policies -* [ ] Entitlements +* [ ] Jobs +* [ ] Clusters (EC2 based example) * [ ] IAM Instance Profiles +* [ ] Notebooks +* [ ] DBFS +* [ ] Libraries +* [ ] Cluster Policies (private preview) +* [ ] Entitlements (private preview) ## Testing -###TODOs - * [ ] Integration tests should be run at a client level against both azure and aws to maintain sdk parity against both apis **(currently only on one cloud)** * [ ] Terraform acceptance tests should be run against both aws and azure to maintain parity of provider between both cloud services **(currently only on one cloud)** diff --git a/client/client.go b/client/client.go index added5b3e3..6c3ce271b3 100644 --- a/client/client.go +++ b/client/client.go @@ -124,6 +124,7 @@ func PerformQuery(option DBClientOption, method, path string, apiVersion string, return nil, err } requestURL += "?" + params.Encode() + log.Println(string(requestURL)) } else { if marshalJson { bodyBytes, err := json.Marshal(data) diff --git a/client/model/token.go b/client/model/token.go index 188d40f3d0..6c7cde04f7 100644 --- a/client/model/token.go +++ b/client/model/token.go @@ -13,14 +13,3 @@ type TokenInfo struct { ExpiryTime int64 `json:"expiry_time,omitempty"` Comment string `json:"comment,omitempty"` } - -// -//{ -//"token_value":"dapideadbeefdeadbeefdeadbeefdeadbeef", -//"token_info": { -//"token_id":"5715498424f15ee0213be729257b53fc35a47d5953e3bdfd8ed22a0b93b339f4", -//"creation_time":1513120516294, -//"expiry_time":1513120616294, -//"comment":"this is an example token" -//} -//} diff --git a/client/service/api.go b/client/service/api.go index 2483cf0a0b..3cfd3d53ee 100644 --- a/client/service/api.go +++ b/client/service/api.go @@ -1,7 +1,7 @@ package service import ( - db "github.com/stikkireddy/databricks-tf-provider/client" + db "github.com/databrickslabs/databricks-terraform/client" ) var scimHeaders = map[string]string{ @@ -55,6 +55,11 @@ func (c DBApiClient) Groups() GroupsAPI { return groupsAPI.init(c) } +func (c DBApiClient) Notebooks() NotebooksAPI { + var notebooksApi NotebooksAPI + return notebooksApi.init(c) +} + func (c DBApiClient) InstancePools() InstancePoolsAPI { var instancePoolsAPI InstancePoolsAPI return instancePoolsAPI.init(c) diff --git a/client/service/clusters.go b/client/service/clusters.go index f0be610378..138937f35b 100644 --- a/client/service/clusters.go +++ b/client/service/clusters.go @@ -3,7 +3,7 @@ package service import ( "encoding/json" "errors" - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "log" "net/http" "time" diff --git a/client/service/clusters_integration_test.go b/client/service/clusters_integration_test.go index d03796a5af..8199213229 100644 --- a/client/service/clusters_integration_test.go +++ b/client/service/clusters_integration_test.go @@ -1,7 +1,7 @@ package service import ( - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "github.com/stretchr/testify/assert" "testing" ) diff --git a/client/service/groups.go b/client/service/groups.go index c619352604..b9c390c037 100644 --- a/client/service/groups.go +++ b/client/service/groups.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" "fmt" - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "net/http" ) diff --git a/client/service/instance_pools.go b/client/service/instance_pools.go index e44afe3774..cada3bbe0f 100644 --- a/client/service/instance_pools.go +++ b/client/service/instance_pools.go @@ -2,7 +2,7 @@ package service import ( "encoding/json" - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "log" "net/http" ) diff --git a/client/service/instance_pools_integration_test.go b/client/service/instance_pools_integration_test.go index 2f9a3e147f..23aa0dd905 100644 --- a/client/service/instance_pools_integration_test.go +++ b/client/service/instance_pools_integration_test.go @@ -1,7 +1,7 @@ package service import ( - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "github.com/stretchr/testify/assert" "testing" ) diff --git a/client/service/instance_pools_test.go b/client/service/instance_pools_test.go index fd50e978dd..79f2e553dc 100644 --- a/client/service/instance_pools_test.go +++ b/client/service/instance_pools_test.go @@ -1,7 +1,7 @@ package service import ( - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "net/http" "testing" ) diff --git a/client/service/main_test.go b/client/service/main_test.go index bbb3539918..0271e236e1 100644 --- a/client/service/main_test.go +++ b/client/service/main_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "github.com/joho/godotenv" "github.com/r3labs/diff" - "github.com/stikkireddy/databricks-tf-provider/client" + "github.com/databrickslabs/databricks-terraform/client" "github.com/stretchr/testify/assert" "log" "net/http" diff --git a/client/service/secret_acls.go b/client/service/secret_acls.go index ce6e217207..a310673a65 100644 --- a/client/service/secret_acls.go +++ b/client/service/secret_acls.go @@ -2,7 +2,7 @@ package service import ( "encoding/json" - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "net/http" ) diff --git a/client/service/secret_acls_test.go b/client/service/secret_acls_test.go index b67e4f76e4..62b68d27a7 100644 --- a/client/service/secret_acls_test.go +++ b/client/service/secret_acls_test.go @@ -1,7 +1,7 @@ package service import ( - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "net/http" "testing" ) diff --git a/client/service/secret_scopes.go b/client/service/secret_scopes.go index 5d0619ba5c..be57608486 100644 --- a/client/service/secret_scopes.go +++ b/client/service/secret_scopes.go @@ -3,7 +3,7 @@ package service import ( "encoding/json" "errors" - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "net/http" ) diff --git a/client/service/secret_scopes_test.go b/client/service/secret_scopes_test.go index 395eebdb90..b59a2a5096 100644 --- a/client/service/secret_scopes_test.go +++ b/client/service/secret_scopes_test.go @@ -1,7 +1,7 @@ package service import ( - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "net/http" "testing" ) diff --git a/client/service/secrets.go b/client/service/secrets.go index eeff554fd1..d6d9c932f4 100644 --- a/client/service/secrets.go +++ b/client/service/secrets.go @@ -3,7 +3,7 @@ package service import ( "encoding/json" "errors" - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "net/http" ) diff --git a/client/service/secrets_scopes_acls_integration_test.go b/client/service/secrets_scopes_acls_integration_test.go index 8991bf81f6..9c4dde3784 100644 --- a/client/service/secrets_scopes_acls_integration_test.go +++ b/client/service/secrets_scopes_acls_integration_test.go @@ -1,7 +1,7 @@ package service import ( - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "github.com/stretchr/testify/assert" "testing" ) diff --git a/client/service/secrets_test.go b/client/service/secrets_test.go index c561d84a2a..8fbdfd5656 100644 --- a/client/service/secrets_test.go +++ b/client/service/secrets_test.go @@ -1,7 +1,7 @@ package service import ( - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "net/http" "testing" ) diff --git a/client/service/tokens.go b/client/service/tokens.go index 3630fe0e73..027395c690 100644 --- a/client/service/tokens.go +++ b/client/service/tokens.go @@ -3,7 +3,7 @@ package service import ( "encoding/json" "errors" - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "net/http" ) diff --git a/client/service/users.go b/client/service/users.go index 619cd66cbd..6f578ed34c 100644 --- a/client/service/users.go +++ b/client/service/users.go @@ -3,7 +3,7 @@ package service import ( "encoding/json" "fmt" - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "net/http" ) diff --git a/client/service/users_integration_test.go b/client/service/users_integration_test.go index a0024df98b..8888a3ae7b 100644 --- a/client/service/users_integration_test.go +++ b/client/service/users_integration_test.go @@ -1,7 +1,7 @@ package service import ( - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client/model" "github.com/stretchr/testify/assert" "testing" ) diff --git a/db/azure_ws_init.go b/db/azure_ws_init.go index e4fde87ed3..8d4d75a957 100644 --- a/db/azure_ws_init.go +++ b/db/azure_ws_init.go @@ -2,8 +2,8 @@ package db import ( "encoding/json" - "github.com/stikkireddy/databricks-tf-provider/client" - "github.com/stikkireddy/databricks-tf-provider/client/service" + "github.com/databrickslabs/databricks-terraform/client" + "github.com/databrickslabs/databricks-terraform/client/service" "log" "net/http" ) diff --git a/db/azure_ws_init_test.go b/db/azure_ws_init_test.go index d727ea6e73..b40e195e53 100644 --- a/db/azure_ws_init_test.go +++ b/db/azure_ws_init_test.go @@ -1,8 +1,8 @@ package db import ( - "github.com/stikkireddy/databricks-tf-provider/client" - "github.com/stikkireddy/databricks-tf-provider/client/model" + "github.com/databrickslabs/databricks-terraform/client" + "github.com/databrickslabs/databricks-terraform/client/model" "github.com/stretchr/testify/assert" "log" "os" diff --git a/db/provider.go b/db/provider.go index 8513ed5a10..064dbe9cae 100644 --- a/db/provider.go +++ b/db/provider.go @@ -3,8 +3,8 @@ package db import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/terraform" - "github.com/stikkireddy/databricks-tf-provider/client" - "github.com/stikkireddy/databricks-tf-provider/client/service" + "github.com/databrickslabs/databricks-terraform/client" + "github.com/databrickslabs/databricks-terraform/client/service" "log" "os" ) diff --git a/db/resource_db_instance_pool.go b/db/resource_db_instance_pool.go index 219e24fcec..f604e69876 100644 --- a/db/resource_db_instance_pool.go +++ b/db/resource_db_instance_pool.go @@ -2,8 +2,8 @@ package db import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/stikkireddy/databricks-tf-provider/client/model" - "github.com/stikkireddy/databricks-tf-provider/client/service" + "github.com/databrickslabs/databricks-terraform/client/model" + "github.com/databrickslabs/databricks-terraform/client/service" "strconv" ) diff --git a/db/resource_db_scim_group.go b/db/resource_db_scim_group.go index d430a0cb0e..f94db33ec1 100644 --- a/db/resource_db_scim_group.go +++ b/db/resource_db_scim_group.go @@ -2,8 +2,8 @@ package db import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/stikkireddy/databricks-tf-provider/client/model" - "github.com/stikkireddy/databricks-tf-provider/client/service" + "github.com/databrickslabs/databricks-terraform/client/model" + "github.com/databrickslabs/databricks-terraform/client/service" "log" ) diff --git a/db/resource_db_scim_group_test.go b/db/resource_db_scim_group_test.go index 687a70c060..8993fde1d2 100644 --- a/db/resource_db_scim_group_test.go +++ b/db/resource_db_scim_group_test.go @@ -2,22 +2,6 @@ package db import "testing" -func diff(sliceA []string, sliceB []string) []string { - var output []string - m := make(map[string]int) - for _, y := range sliceB { - m[y]++ - } - for _, x := range sliceA { - if m[x] > 0 { - m[x]-- - continue - } - output = append(output, x) - } - return output -} - func TestDiff(t *testing.T) { tf_main := []string{"a", "b", "c"} remote := []string{"b", "d"} diff --git a/db/resource_db_scim_user.go b/db/resource_db_scim_user.go index 80ad046b40..32efbf68e1 100644 --- a/db/resource_db_scim_user.go +++ b/db/resource_db_scim_user.go @@ -2,8 +2,8 @@ package db import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/stikkireddy/databricks-tf-provider/client/model" - "github.com/stikkireddy/databricks-tf-provider/client/service" + "github.com/databrickslabs/databricks-terraform/client/model" + "github.com/databrickslabs/databricks-terraform/client/service" "log" ) diff --git a/db/resource_db_secret.go b/db/resource_db_secret.go index 2edb7e1845..aed6dd2956 100644 --- a/db/resource_db_secret.go +++ b/db/resource_db_secret.go @@ -5,7 +5,7 @@ import ( "encoding/base64" "encoding/gob" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/stikkireddy/databricks-tf-provider/client/service" + "github.com/databrickslabs/databricks-terraform/client/service" "strings" ) diff --git a/db/resource_db_secret_acl.go b/db/resource_db_secret_acl.go index 3332cb1793..1eb45dc7a7 100644 --- a/db/resource_db_secret_acl.go +++ b/db/resource_db_secret_acl.go @@ -2,8 +2,8 @@ package db import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/stikkireddy/databricks-tf-provider/client/model" - "github.com/stikkireddy/databricks-tf-provider/client/service" + "github.com/databrickslabs/databricks-terraform/client/model" + "github.com/databrickslabs/databricks-terraform/client/service" "strings" ) diff --git a/db/resource_db_secret_scope.go b/db/resource_db_secret_scope.go index c5582ceaf0..cd7994f799 100644 --- a/db/resource_db_secret_scope.go +++ b/db/resource_db_secret_scope.go @@ -2,7 +2,7 @@ package db import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/stikkireddy/databricks-tf-provider/client/service" + "github.com/databrickslabs/databricks-terraform/client/service" ) func resourceSecretScope() *schema.Resource { diff --git a/db/resource_db_token.go b/db/resource_db_token.go index 1bec5f26e4..c08f81da62 100644 --- a/db/resource_db_token.go +++ b/db/resource_db_token.go @@ -2,7 +2,7 @@ package db import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/stikkireddy/databricks-tf-provider/client/service" + "github.com/databrickslabs/databricks-terraform/client/service" ) func resourceToken() *schema.Resource { diff --git a/db/resource_db_token_test.go b/db/resource_db_token_test.go index b88f670421..6869d2134c 100644 --- a/db/resource_db_token_test.go +++ b/db/resource_db_token_test.go @@ -6,8 +6,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" - "github.com/stikkireddy/databricks-tf-provider/client/model" - "github.com/stikkireddy/databricks-tf-provider/client/service" + "github.com/databrickslabs/databricks-terraform/client/model" + "github.com/databrickslabs/databricks-terraform/client/service" "testing" ) diff --git a/docs/source/provider/installation.md b/docs/source/provider/installation.md index 570f1fc448..c42d9d501f 100644 --- a/docs/source/provider/installation.md +++ b/docs/source/provider/installation.md @@ -2,25 +2,26 @@ A Terraform provider for Databricks workspace components -## Installing `databricks-tf-provider` with Go +## Installing `databricks-terraform` with Go * Install Go 1.13. For previous versions, you may have to set your `$GOPATH` manually, if you haven't done it yet visit [here](https://golang.org/doc/install). * Install Terraform 0.12.x [from here](https://www.terraform.io/downloads.html) and save it into `/usr/local/bin/terraform` folder (create it if it doesn't exists). This provider DOES NOT SUPPORT Terraform 0.12 or above. * Download the code by issuing a `go get` command. ```bash -# Download the source code for databricks-tf-provider +# Download the source code for databricks-terraform # and build the needed binary, by saving it inside $GOPATH/bin -$ go get -u github.com/stikkireddy/databricks-tf-provider +$ go get -u github.com/databrickslabs/databricks-terraform + # After fetching the code base we will switch into the directory for the code base. -$ cd $GOPATH/src/github.com/stikkireddy/databricks-tf-provider +$ cd $GOPATH/src/github.com/databrickslabs/databricks-terraform # Once in the directory you will run the build using the make command provided by the make file $ make build # Once the file is made we will then move the file to where terraform can pick it up -$ mv terraform-provider-db /usr/local/bin/ +$ mkdir -p ~/.terraform.d/plugins/ && cp terraform-provider-db ~/.terraform.d/plugins/terraform-provider-db ``` If you wish to uninstall the binary simply remove the file from the directory. @@ -29,7 +30,7 @@ If you wish to uninstall the binary simply remove the file from the directory. $ rm /usr/local/bin/terraform-provider-db ``` -## Using `databricks-tf-provider` with Docker (TODO!!) +## Using `databricks-terraform` with Docker (TODO!!) diff --git a/go.mod b/go.mod index 3edcbc8615..eb636da9bb 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/stikkireddy/databricks-tf-provider +module github.com/databrickslabs/databricks-terraform go 1.13 diff --git a/main.go b/main.go index 106d259232..139dfe342e 100644 --- a/main.go +++ b/main.go @@ -3,7 +3,7 @@ package main import ( "github.com/hashicorp/terraform-plugin-sdk/plugin" "github.com/hashicorp/terraform-plugin-sdk/terraform" - "github.com/stikkireddy/databricks-tf-provider/db" + "github.com/databrickslabs/databricks-terraform/db" ) func main() {