Skip to content

Commit a21b815

Browse files
committed
added documentation for mws resources
1 parent 89af527 commit a21b815

File tree

5 files changed

+419
-3
lines changed

5 files changed

+419
-3
lines changed

website/content/Provider/_index.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ resource "databricks_scim_user" "my-user" {
3131
``` hcl
3232
provider "databricks" {
3333
host = "http://databricks.domain.com"
34-
token = base64encode("${var.user}:${var.password}")
35-
auth_type = "BASIC"
34+
basic_auth {
35+
username = var.user
36+
password = var.password
37+
}
3638
}
3739
3840
resource "databricks_scim_user" "my-user" {
@@ -137,6 +139,8 @@ The following variables can be passed via environment variables:
137139

138140
* `host``DATABRICKS_HOST`
139141
* `token``DATABRICKS_TOKEN`
142+
* `basic_auth.username``DATABRICKS_USERNAME`
143+
* `basic_auth.password``DATABRICKS_PASSWORD`
140144
* `managed_resource_group``DATABRICKS_AZURE_MANAGED_RESOURCE_GROUP`
141145
* `azure_region``AZURE_REGION`
142146
* `workspace_name``DATABRICKS_AZURE_WORKSPACE_NAME`
@@ -172,7 +176,26 @@ Alternatively you can provide this value as an environment variable `DATABRICKS_
172176
> This is the api token to authenticate into the workspace. Alternatively you can provide this value as an
173177
environment variable `DATABRICKS_TOKEN`.
174178

175-
#### `azure-auth`:
179+
#### `basic_auth`:
180+
> #### **Usage**
181+
>```hcl
182+
>basic_auth = {
183+
> username = "user"
184+
> password = "mypass-123"
185+
>}
186+
>```
187+
> {{%chevron default=`This is the authentication required to authenticate to the Databricks via basic auth through a user
188+
that has access to the workspace. This is optional as you can use the api token based auth.
189+
The basic_auth block contains the following arguments:` display="true" %}}
190+
191+
* `username` - This is the username of the user that can log into the workspace.
192+
Alternatively you can provide this value as an environment variable `DATABRICKS_USERNAME`.
193+
194+
* `password` - This is the password of the user that can log into the workspace.
195+
Alternatively you can provide this value as an environment variable `DATABRICKS_PASSWORD`.
196+
{{% /chevron %}}
197+
198+
#### `azure_auth`:
176199
> #### **Usage**
177200
>```hcl
178201
>azure_auth = {
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
+++
2+
title = "mws_credentials"
3+
date = 2020-04-20T23:34:03-04:00
4+
weight = 15
5+
chapter = false
6+
pre = ""
7+
+++
8+
9+
10+
## Resource: `mws_credentials`
11+
12+
This resource to configure the credentials for the multiple workspaces api.
13+
14+
{{% notice warning %}}
15+
It is important to understand that this will require you to configure your provider separately for the
16+
multiple workspaces resources
17+
{{% /notice %}}
18+
19+
{{% notice note %}}
20+
This will point to https://accounts.cloud.databricks.com for the HOST and it will use basic auth
21+
as that is the only authentication method available for multiple workspaces api.
22+
{{% /notice %}}
23+
24+
25+
## Example Usage
26+
27+
````hcl
28+
provider "databricks" {
29+
host = "https://accounts.cloud.databricks.com"
30+
basic_auth {
31+
username = "username"
32+
password = "password"
33+
}
34+
}
35+
resource "databricks_mws_credentials" "my_mws_credentials" {
36+
account_id = "my-mws-account-id"
37+
credentials_name = "my-cusotom-credentials"
38+
role_arn = "arn:aws:iam::9999999999999:role/my-custom-cross-account-role"
39+
}
40+
````
41+
## Argument Reference
42+
43+
The following arguments are supported:
44+
45+
#### - `account_id`:
46+
> **(Required)** Databricks multi-workspace master account ID.
47+
48+
#### - `credentials_name`:
49+
> **(Required)** The human-readable name of the credential configuration object.
50+
51+
#### - `role_arn`:
52+
> **(Required)** This is the ARN of the role arn for the cross account role.
53+
54+
55+
## Attribute Reference
56+
57+
In addition to all arguments above, the following attributes are exported:
58+
59+
#### - `id`:
60+
> The id of the resource which follows the format accountId/credentialsId.
61+
62+
#### - `creation_time`:
63+
> Time in epoch milliseconds when the credential was created.
64+
65+
#### - `external_id`:
66+
> The external ID that needs be trusted by the cross-account role. This is always the account_id, which is your Databricks multi-workspace master account ID.
67+
68+
#### - `credentials_id`:
69+
> Databricks credential configuration ID.
70+
71+
72+
73+
## Import
74+
75+
{{% notice note %}}
76+
Importing this resource is not currently supported.
77+
{{% /notice %}}
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
+++
2+
title = "mws_networks"
3+
date = 2020-04-20T23:34:03-04:00
4+
weight = 15
5+
chapter = false
6+
pre = ""
7+
+++
8+
9+
10+
## Resource: `mws_networks`
11+
12+
This resource to configure the vpc for the multiple workspaces api if the BYOVPC option is chosen.
13+
14+
{{% notice warning %}}
15+
It is important to understand that this will require you to configure your provider separately for the
16+
multiple workspaces resources
17+
{{% /notice %}}
18+
19+
{{% notice note %}}
20+
This will point to https://accounts.cloud.databricks.com for the HOST and it will use basic auth
21+
as that is the only authentication method available for multiple workspaces api.
22+
{{% /notice %}}
23+
24+
25+
## Example Usage
26+
27+
````hcl
28+
provider "databricks" {
29+
host = "https://accounts.cloud.databricks.com"
30+
basic_auth {
31+
username = "username"
32+
password = "password"
33+
}
34+
}
35+
resource "databricks_mws_networks" "my_network" {
36+
account_id = "my-mws-acct-id"
37+
network_name = "my-custom-network-config-name"
38+
vpc_id = "my-aws-vpc-id"
39+
subnet_ids = [
40+
"my-first-subnet",
41+
"my-second-subnet",
42+
]
43+
security_group_ids = [
44+
"my-security-group-1",
45+
]
46+
}
47+
````
48+
## Argument Reference
49+
50+
The following arguments are supported:
51+
52+
#### - `account_id`:
53+
> **(Required)** Databricks multi-workspace master account ID.
54+
55+
#### - `network_name`:
56+
> **(Required)** The human-readable name of the network configuration.
57+
58+
#### - `vpc_id`:
59+
> **(Required)** The ID of the VPC associated with this network. VPC IDs can be used in multiple network configurations.
60+
61+
#### - `subnet_ids`:
62+
> **(Required)** IDs of at least 2 subnets associated with this network.
63+
>Subnet IDs cannot be used in multiple network configurations.
64+
65+
#### - `security_group_ids`:
66+
> **(Required)** IDs of 1 to 5 security groups associated with this network.
67+
>Security groups IDs cannot be used in multiple network configurations.
68+
69+
70+
## Attribute Reference
71+
72+
In addition to all arguments above, the following attributes are exported:
73+
74+
#### - `id`:
75+
> The id of the resource which follows the format accountId/networksId.
76+
77+
#### - `vpc_status`:
78+
> Enum: "UNATTACHED" "VALID" "BROKEN" "WARNED"
79+
> The status of this network configuration object in terms of its use in a workspace:
80+
>
81+
> UNATTACHED — Unattached.
82+
> VALID — Valid.
83+
> BROKEN — Broken.
84+
> WARNED — Warned.
85+
86+
#### - `error_messages`:
87+
> Array of error messages about the network configuration.
88+
> Contains the following objects:
89+
> error_type: The AWS resource associated with this error: credentials, VPC, subnet, security group, or network ACL.
90+
> error_message: Details of the error.
91+
92+
#### - `workspace_id`:
93+
> Workspace ID associated with this network configuration. Can be empty.
94+
95+
#### - `creation_time`:
96+
> Time in epoch milliseconds when the network was created.
97+
98+
#### - `network_id`:
99+
> The Databricks network configuration ID.
100+
101+
## Import
102+
103+
{{% notice note %}}
104+
Importing this resource is not currently supported.
105+
{{% /notice %}}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
+++
2+
title = "multiworkspace_storage_configurations"
3+
date = 2020-04-20T23:34:03-04:00
4+
weight = 15
5+
chapter = false
6+
pre = ""
7+
+++
8+
9+
10+
## Resource: `multiworkspace_storage_configurations`
11+
12+
This resource to configure the root bucket for the multiple workspaces api.
13+
14+
{{% notice warning %}}
15+
It is important to understand that this will require you to configure your provider separately for the
16+
multiple workspaces resources
17+
{{% /notice %}}
18+
19+
{{% notice note %}}
20+
This will point to https://accounts.cloud.databricks.com for the HOST and it will use basic auth
21+
as that is the only authentication method available for multiple workspaces api.
22+
{{% /notice %}}
23+
24+
25+
## Example Usage
26+
27+
````hcl
28+
provider "databricks" {
29+
host = "https://accounts.cloud.databricks.com"
30+
basic_auth {
31+
username = "username"
32+
password = "password"
33+
}
34+
}
35+
resource "databricks_mws_storage_configurations" "my_mws_storage_configurations" {
36+
account_id = "my-mws-acct-id"
37+
storage_configuration_name = "storage-configuration-name"
38+
bucket_name = "my-root-s3-bucket"
39+
}
40+
````
41+
## Argument Reference
42+
43+
The following arguments are supported:
44+
45+
#### - `account_id`:
46+
> **(Required)** Databricks multi-workspace master account ID.
47+
48+
#### - `storage_configuration_name`:
49+
> **(Required)** The human-readable name of the storage configuration.
50+
51+
#### - `bucket_name`:
52+
> **(Required)** Root S3 bucket information.
53+
54+
55+
## Attribute Reference
56+
57+
In addition to all arguments above, the following attributes are exported:
58+
59+
#### - `id`:
60+
> The id of the resource which follows the format accountId/storageConfigurationId.
61+
62+
#### - `creation_time`:
63+
> Time in epoch milliseconds when the storage configuration was created
64+
65+
#### - `storage_configuration_id`:
66+
> Databricks storage configuration ID.
67+
68+
69+
70+
## Import
71+
72+
{{% notice note %}}
73+
Importing this resource is not currently supported.
74+
{{% /notice %}}

0 commit comments

Comments
 (0)