Skip to content

Commit 37f446b

Browse files
authored
Reformat code samples in the documentation (#2146)
1 parent 01efc82 commit 37f446b

File tree

7 files changed

+54
-54
lines changed

7 files changed

+54
-54
lines changed

docs/guides/azure-private-link-workspace-simplified.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ Define the required variables
6868

6969
```hcl
7070
variable "cidr" {
71-
type = string
71+
type = string
7272
}
7373
7474
variable "rg_name" {
75-
type = string
75+
type = string
7676
}
7777
7878
variable "location" {
79-
type = string
79+
type = string
8080
}
8181
8282
data "azurerm_client_config" "current" {
@@ -206,7 +206,7 @@ resource "azurerm_subnet" "plsubnet" {
206206
resource_group_name = var.rg_name
207207
virtual_network_name = azurerm_virtual_network.this.name
208208
address_prefixes = [cidrsubnet(var.cidr, 3, 2)]
209-
enforce_private_link_endpoint_network_policies = true
209+
enforce_private_link_endpoint_network_policies = true
210210
}
211211
212212
```
@@ -223,7 +223,7 @@ resource "azurerm_private_endpoint" "uiapi" {
223223
name = "uiapipvtendpoint"
224224
location = var.location
225225
resource_group_name = var.rg_name
226-
subnet_id = azurerm_subnet.plsubnet.id
226+
subnet_id = azurerm_subnet.plsubnet.id
227227
228228
private_service_connection {
229229
name = "ple-${var.workspace_prefix}-uiapi"
@@ -260,7 +260,7 @@ resource "azurerm_private_endpoint" "auth" {
260260
name = "aadauthpvtendpoint"
261261
location = var.location
262262
resource_group_name = var.rg_name
263-
subnet_id = azurerm_subnet.plsubnet.id
263+
subnet_id = azurerm_subnet.plsubnet.id
264264
265265
private_service_connection {
266266
name = "ple-${var.workspace_prefix}-auth"
@@ -299,12 +299,12 @@ resource "azurerm_databricks_workspace" "this" {
299299
private_subnet_network_security_group_association_id = azurerm_subnet_network_security_group_association.private.id
300300
storage_account_name = "dbfs"
301301
}
302-
302+
303303
depends_on = [
304304
azurerm_subnet_network_security_group_association.public,
305305
azurerm_subnet_network_security_group_association.private
306306
]
307307
}
308308
```
309309

310-
-> **Note** The public network access to the workspace is disabled. You can access the workspace only through the private connectivity to the on-premises user environment. For testing purposes, you can deploy an Azure VM in the same vnet in order to test the frontend connectivity.
310+
-> **Note** The public network access to the workspace is disabled. You can access the workspace only through the private connectivity to the on-premises user environment. For testing purposes, you can deploy an Azure VM in the same vnet in order to test the frontend connectivity.

docs/guides/gcp-private-service-connect-workspace.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ resource "google_compute_router_nat" "nat" {
5858
}
5959
6060
resource "databricks_mws_vpc_endpoint" "backend_rest_vpce" {
61-
account_id = var.databricks_account_id
62-
vpc_endpoint_name = "vpce-backend-rest-${random_string.suffix.result}"
61+
account_id = var.databricks_account_id
62+
vpc_endpoint_name = "vpce-backend-rest-${random_string.suffix.result}"
6363
gcp_vpc_endpoint_info {
6464
project_id = var.google_project
6565
psc_endpoint_name = var.backend_rest_psce
@@ -68,8 +68,8 @@ resource "databricks_mws_vpc_endpoint" "backend_rest_vpce" {
6868
}
6969
7070
resource "databricks_mws_vpc_endpoint" "relay_vpce" {
71-
account_id = var.databricks_account_id
72-
vpc_endpoint_name = "vpce-relay-${random_string.suffix.result}"
71+
account_id = var.databricks_account_id
72+
vpc_endpoint_name = "vpce-relay-${random_string.suffix.result}"
7373
gcp_vpc_endpoint_info {
7474
project_id = var.google_project
7575
psc_endpoint_name = var.relay_psce
@@ -127,7 +127,7 @@ resource "databricks_mws_workspaces" "this" {
127127
}
128128
129129
private_service_connect_id = databricks_mws_private_access_settings.pas.private_access_settings_id
130-
network_id = databricks_mws_networks.this.network_id
130+
network_id = databricks_mws_networks.this.network_id
131131
gke_config {
132132
connectivity_type = "PRIVATE_NODE_PUBLIC_MASTER"
133133
master_ip_range = "10.3.0.0/28"

docs/guides/unity-catalog-gcp.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ terraform {
5959
source = "databricks/databricks"
6060
}
6161
google = {
62-
source = "hashicorp/google"
62+
source = "hashicorp/google"
6363
}
6464
random = {
6565
source = "hashicorp/random"
66-
}
66+
}
6767
}
6868
}
6969
@@ -104,7 +104,7 @@ resource "databricks_metastore" "this" {
104104
resource "databricks_metastore_data_access" "first" {
105105
metastore_id = databricks_metastore.this.id
106106
databricks_gcp_service_account {}
107-
name = "the-keys"
107+
name = "the-keys"
108108
is_default = true
109109
}
110110
@@ -297,8 +297,8 @@ resource "databricks_cluster" "dev" {
297297
node_type_id = data.databricks_node_type.smallest.id
298298
autotermination_minutes = 10
299299
num_workers = 2
300-
data_security_mode = "SINGLE_USER"
301-
single_user_name = each.value.user_name
300+
data_security_mode = "SINGLE_USER"
301+
single_user_name = each.value.user_name
302302
# need to wait until the metastore is assigned
303303
depends_on = [
304304
databricks_metastore_assignment.this

docs/resources/model_serving.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@ resource "databricks_model_serving" "this" {
1212
name = "ads-serving-endpoint"
1313
config {
1414
served_models {
15-
name = "prod_model"
16-
model_name = "ads-model"
17-
model_version = "2"
18-
workload_size = "Small"
15+
name = "prod_model"
16+
model_name = "ads-model"
17+
model_version = "2"
18+
workload_size = "Small"
1919
scale_to_zero_enabled = true
2020
}
2121
served_models {
22-
name = "candidate_model"
23-
model_name = "ads-model"
24-
model_version = "4"
25-
workload_size = "Small"
22+
name = "candidate_model"
23+
model_name = "ads-model"
24+
model_version = "4"
25+
workload_size = "Small"
2626
scale_to_zero_enabled = false
2727
}
2828
traffic_config {
2929
routes {
30-
served_model_name = "prod_model"
30+
served_model_name = "prod_model"
3131
traffic_percentage = 90
3232
}
3333
routes {
34-
served_model_name = "candidate_model"
34+
served_model_name = "candidate_model"
3535
traffic_percentage = 10
3636
}
3737
}

docs/resources/mws_private_access_settings.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ resource "databricks_mws_workspaces" "this" {
4343
or
4444
```hcl
4545
resource "databricks_mws_workspaces" "this" {
46-
provider = databricks.mws
47-
account_id = var.databricks_account_id
48-
workspace_name = "gcp-workspace"
49-
location = var.subnet_region
46+
provider = databricks.mws
47+
account_id = var.databricks_account_id
48+
workspace_name = "gcp-workspace"
49+
location = var.subnet_region
5050
cloud_resource_container {
5151
gcp {
5252
project_id = var.google_project

docs/resources/mws_vpc_endpoint.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ provider "databricks" {
129129
}
130130
131131
resource "databricks_mws_vpc_endpoint" "workspace" {
132-
provider = databricks.mws
133-
account_id = var.databricks_account_id
134-
vpc_endpoint_name = "PSC Rest API endpoint"
132+
provider = databricks.mws
133+
account_id = var.databricks_account_id
134+
vpc_endpoint_name = "PSC Rest API endpoint"
135135
gcp_vpc_endpoint_info {
136136
project_id = var.google_project
137137
psc_endpoint_name = "PSC Rest API endpoint"
@@ -140,9 +140,9 @@ resource "databricks_mws_vpc_endpoint" "workspace" {
140140
}
141141
142142
resource "databricks_mws_vpc_endpoint" "relay" {
143-
provider = databricks.mws
144-
account_id = var.databricks_account_id
145-
vpc_endpoint_name = "PSC Relay endpoint"
143+
provider = databricks.mws
144+
account_id = var.databricks_account_id
145+
vpc_endpoint_name = "PSC Relay endpoint"
146146
gcp_vpc_endpoint_info {
147147
project_id = var.google_project
148148
psc_endpoint_name = "PSC Relay endpoint"
@@ -155,10 +155,10 @@ Typically the next steps after this would be to create a [databricks_mws_private
155155

156156
```hcl
157157
resource "databricks_mws_workspaces" "this" {
158-
provider = databricks.mws
159-
account_id = var.databricks_account_id
160-
workspace_name = "gcp workspace"
161-
location = var.subnet_region
158+
provider = databricks.mws
159+
account_id = var.databricks_account_id
160+
workspace_name = "gcp workspace"
161+
location = var.subnet_region
162162
cloud_resource_container {
163163
gcp {
164164
project_id = var.google_project

docs/resources/share.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,24 @@ resource "databricks_share" "some" {
4040
history_data_sharing_status = "ENABLED"
4141
partition {
4242
value {
43-
name = "year"
44-
op = "EQUAL"
45-
value = "2009"
43+
name = "year"
44+
op = "EQUAL"
45+
value = "2009"
4646
}
4747
value {
48-
name = "month"
49-
op = "EQUAL"
50-
value = "12"
48+
name = "month"
49+
op = "EQUAL"
50+
value = "12"
5151
}
52-
}
52+
}
5353
partition {
5454
value {
55-
name = "year"
56-
op = "EQUAL"
57-
value = "2010"
55+
name = "year"
56+
op = "EQUAL"
57+
value = "2010"
5858
}
59-
}
60-
}
59+
}
60+
}
6161
}
6262
```
6363

0 commit comments

Comments
 (0)