Skip to content

Commit

Permalink
Reformat code samples in the documentation (#2146)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexott committed Mar 24, 2023
1 parent 01efc82 commit 37f446b
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 54 deletions.
16 changes: 8 additions & 8 deletions docs/guides/azure-private-link-workspace-simplified.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ Define the required variables

```hcl
variable "cidr" {
type = string
type = string
}
variable "rg_name" {
type = string
type = string
}
variable "location" {
type = string
type = string
}
data "azurerm_client_config" "current" {
Expand Down Expand Up @@ -206,7 +206,7 @@ resource "azurerm_subnet" "plsubnet" {
resource_group_name = var.rg_name
virtual_network_name = azurerm_virtual_network.this.name
address_prefixes = [cidrsubnet(var.cidr, 3, 2)]
enforce_private_link_endpoint_network_policies = true
enforce_private_link_endpoint_network_policies = true
}
```
Expand All @@ -223,7 +223,7 @@ resource "azurerm_private_endpoint" "uiapi" {
name = "uiapipvtendpoint"
location = var.location
resource_group_name = var.rg_name
subnet_id = azurerm_subnet.plsubnet.id
subnet_id = azurerm_subnet.plsubnet.id
private_service_connection {
name = "ple-${var.workspace_prefix}-uiapi"
Expand Down Expand Up @@ -260,7 +260,7 @@ resource "azurerm_private_endpoint" "auth" {
name = "aadauthpvtendpoint"
location = var.location
resource_group_name = var.rg_name
subnet_id = azurerm_subnet.plsubnet.id
subnet_id = azurerm_subnet.plsubnet.id
private_service_connection {
name = "ple-${var.workspace_prefix}-auth"
Expand Down Expand Up @@ -299,12 +299,12 @@ resource "azurerm_databricks_workspace" "this" {
private_subnet_network_security_group_association_id = azurerm_subnet_network_security_group_association.private.id
storage_account_name = "dbfs"
}
depends_on = [
azurerm_subnet_network_security_group_association.public,
azurerm_subnet_network_security_group_association.private
]
}
```

-> **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.
-> **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.
10 changes: 5 additions & 5 deletions docs/guides/gcp-private-service-connect-workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ resource "google_compute_router_nat" "nat" {
}
resource "databricks_mws_vpc_endpoint" "backend_rest_vpce" {
account_id = var.databricks_account_id
vpc_endpoint_name = "vpce-backend-rest-${random_string.suffix.result}"
account_id = var.databricks_account_id
vpc_endpoint_name = "vpce-backend-rest-${random_string.suffix.result}"
gcp_vpc_endpoint_info {
project_id = var.google_project
psc_endpoint_name = var.backend_rest_psce
Expand All @@ -68,8 +68,8 @@ resource "databricks_mws_vpc_endpoint" "backend_rest_vpce" {
}
resource "databricks_mws_vpc_endpoint" "relay_vpce" {
account_id = var.databricks_account_id
vpc_endpoint_name = "vpce-relay-${random_string.suffix.result}"
account_id = var.databricks_account_id
vpc_endpoint_name = "vpce-relay-${random_string.suffix.result}"
gcp_vpc_endpoint_info {
project_id = var.google_project
psc_endpoint_name = var.relay_psce
Expand Down Expand Up @@ -127,7 +127,7 @@ resource "databricks_mws_workspaces" "this" {
}
private_service_connect_id = databricks_mws_private_access_settings.pas.private_access_settings_id
network_id = databricks_mws_networks.this.network_id
network_id = databricks_mws_networks.this.network_id
gke_config {
connectivity_type = "PRIVATE_NODE_PUBLIC_MASTER"
master_ip_range = "10.3.0.0/28"
Expand Down
10 changes: 5 additions & 5 deletions docs/guides/unity-catalog-gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ terraform {
source = "databricks/databricks"
}
google = {
source = "hashicorp/google"
source = "hashicorp/google"
}
random = {
source = "hashicorp/random"
}
}
}
}
Expand Down Expand Up @@ -104,7 +104,7 @@ resource "databricks_metastore" "this" {
resource "databricks_metastore_data_access" "first" {
metastore_id = databricks_metastore.this.id
databricks_gcp_service_account {}
name = "the-keys"
name = "the-keys"
is_default = true
}
Expand Down Expand Up @@ -297,8 +297,8 @@ resource "databricks_cluster" "dev" {
node_type_id = data.databricks_node_type.smallest.id
autotermination_minutes = 10
num_workers = 2
data_security_mode = "SINGLE_USER"
single_user_name = each.value.user_name
data_security_mode = "SINGLE_USER"
single_user_name = each.value.user_name
# need to wait until the metastore is assigned
depends_on = [
databricks_metastore_assignment.this
Expand Down
20 changes: 10 additions & 10 deletions docs/resources/model_serving.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ resource "databricks_model_serving" "this" {
name = "ads-serving-endpoint"
config {
served_models {
name = "prod_model"
model_name = "ads-model"
model_version = "2"
workload_size = "Small"
name = "prod_model"
model_name = "ads-model"
model_version = "2"
workload_size = "Small"
scale_to_zero_enabled = true
}
served_models {
name = "candidate_model"
model_name = "ads-model"
model_version = "4"
workload_size = "Small"
name = "candidate_model"
model_name = "ads-model"
model_version = "4"
workload_size = "Small"
scale_to_zero_enabled = false
}
traffic_config {
routes {
served_model_name = "prod_model"
served_model_name = "prod_model"
traffic_percentage = 90
}
routes {
served_model_name = "candidate_model"
served_model_name = "candidate_model"
traffic_percentage = 10
}
}
Expand Down
8 changes: 4 additions & 4 deletions docs/resources/mws_private_access_settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ resource "databricks_mws_workspaces" "this" {
or
```hcl
resource "databricks_mws_workspaces" "this" {
provider = databricks.mws
account_id = var.databricks_account_id
workspace_name = "gcp-workspace"
location = var.subnet_region
provider = databricks.mws
account_id = var.databricks_account_id
workspace_name = "gcp-workspace"
location = var.subnet_region
cloud_resource_container {
gcp {
project_id = var.google_project
Expand Down
20 changes: 10 additions & 10 deletions docs/resources/mws_vpc_endpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ provider "databricks" {
}
resource "databricks_mws_vpc_endpoint" "workspace" {
provider = databricks.mws
account_id = var.databricks_account_id
vpc_endpoint_name = "PSC Rest API endpoint"
provider = databricks.mws
account_id = var.databricks_account_id
vpc_endpoint_name = "PSC Rest API endpoint"
gcp_vpc_endpoint_info {
project_id = var.google_project
psc_endpoint_name = "PSC Rest API endpoint"
Expand All @@ -140,9 +140,9 @@ resource "databricks_mws_vpc_endpoint" "workspace" {
}
resource "databricks_mws_vpc_endpoint" "relay" {
provider = databricks.mws
account_id = var.databricks_account_id
vpc_endpoint_name = "PSC Relay endpoint"
provider = databricks.mws
account_id = var.databricks_account_id
vpc_endpoint_name = "PSC Relay endpoint"
gcp_vpc_endpoint_info {
project_id = var.google_project
psc_endpoint_name = "PSC Relay endpoint"
Expand All @@ -155,10 +155,10 @@ Typically the next steps after this would be to create a [databricks_mws_private

```hcl
resource "databricks_mws_workspaces" "this" {
provider = databricks.mws
account_id = var.databricks_account_id
workspace_name = "gcp workspace"
location = var.subnet_region
provider = databricks.mws
account_id = var.databricks_account_id
workspace_name = "gcp workspace"
location = var.subnet_region
cloud_resource_container {
gcp {
project_id = var.google_project
Expand Down
24 changes: 12 additions & 12 deletions docs/resources/share.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,24 @@ resource "databricks_share" "some" {
history_data_sharing_status = "ENABLED"
partition {
value {
name = "year"
op = "EQUAL"
value = "2009"
name = "year"
op = "EQUAL"
value = "2009"
}
value {
name = "month"
op = "EQUAL"
value = "12"
name = "month"
op = "EQUAL"
value = "12"
}
}
}
partition {
value {
name = "year"
op = "EQUAL"
value = "2010"
name = "year"
op = "EQUAL"
value = "2010"
}
}
}
}
}
}
```

Expand Down

0 comments on commit 37f446b

Please sign in to comment.