Azure Databricks Workspace
This page shows how to write Terraform and Azure Resource Manager for Databricks Workspace and write them securely.
azurerm_databricks_workspace (Terraform)
The Workspace in Databricks can be configured in Terraform with the resource name azurerm_databricks_workspace. The following sections describe 7 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_databricks_workspace" "standard" {
name = "databricks-test"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
sku = "standard"
}
resource "azurerm_databricks_workspace" "ADB" {
name = var.data_brick_name
resource_group_name = data.azurerm_resource_group.RG.name
location = var.location
sku = var.sku
}
resource "azurerm_databricks_workspace" "corebricks" {
for_each = var.coreDatabricks
name = each.value["brickName"]
resource_group_name = each.value["brickRgName"]
location = each.value["brickLocation"]
sku = each.value["brickSku"]
resource "azurerm_databricks_workspace" "this" {
location = var.location
name = "dbx-mthone-tf"
resource_group_name = azurerm_resource_group.rg.name
sku = "premium"
tags = var.tags
resource "azurerm_databricks_workspace" "adw" {
name = var.name
location = var.location
resource_group_name = var.rg_name
sku = var.sku
tags = var.tags
resource "azurerm_databricks_workspace" "main" {
name = var.databricks_name
resource_group_name = var.resource_group_name
location = var.location
sku = var.databricks_workspace_sku
resource "azurerm_databricks_workspace" "bricks" {
name = "kobricks"
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
sku = "standard"
Parameters
-
idoptional computed - string -
locationrequired - string -
managed_resource_group_idoptional computed - string -
managed_resource_group_nameoptional computed - string -
namerequired - string -
resource_group_namerequired - string -
skurequired - string -
tagsoptional - map from string to string -
workspace_idoptional computed - string -
workspace_urloptional computed - string -
custom_parameterslist block-
no_public_ipoptional - bool -
private_subnet_nameoptional - string -
public_subnet_nameoptional - string -
virtual_network_idoptional - string
-
-
timeoutssingle block
Explanation in Terraform Registry
NOTE: Some Databricks Workspace features are in Private Preview(e.g. Private Link Endpoint, Customer Managed Keys for Managed Services, etc.) and potentially subject to breaking change without notice. If you would like to use these features please contact your Microsoft support representative on how to opt-in to the Databricks Workspace Private Preview feature program. Manages a Databricks Workspace
Microsoft.Databricks/workspaces (Azure Resource Manager)
The workspaces in Microsoft.Databricks can be configured in Azure Resource Manager with the resource name Microsoft.Databricks/workspaces. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
"type": "Microsoft.Databricks/workspaces",
"location": "East US 2",
"tags": null,
"sku": {
"name": "skuName"
},
"type": "Microsoft.Databricks/workspaces",
"location": "East US 2",
"tags": null,
"sku": {
"name": "skuName"
},
"type": "Microsoft.Databricks/workspaces",
"location": "East US 2",
"tags": null,
"sku": {
"name": "skuName"
},
"type": "Microsoft.Databricks/workspaces",
"location": "East US 2",
"tags": null,
"sku": {
"name": "skuName"
},
"type": "Microsoft.Databricks/workspaces",
"location": "East US 2",
"tags": null,
"sku": {
"name": "skuName"
},
"type": "Microsoft.Databricks/workspaces",
"location": "East US 2",
"tags": null,
"sku": {
"name": "skuName"
},
"type": "Microsoft.Databricks/workspaces",
"location": "East US 2",
"tags": null,
"sku": {
"name": "skuName"
},
"type": "Microsoft.Databricks/workspaces",
"location": "East US 2",
"tags": null,
"sku": {
"name": "skuName"
},
"type": "Microsoft.Databricks/workspaces"
},
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Databricks/workspaces/myWorkspace2",
"location": "East US 2",
"name": "myWorkspace2",
"type": "Microsoft.Databricks/workspaces",
"location": "East US 2",
"tags": null,
"sku": {
"name": "skuName"
},
Parameters
apiVersionrequired - stringlocationrequired - stringThe geo-location where the resource lives
namerequired - stringThe name of the workspace.
propertiesrequiredauthorizationsoptional arrayprincipalIdrequired - stringThe provider's principal identifier. This is the identity that the provider will use to call ARM to manage the workspace resources.
roleDefinitionIdrequired - stringThe provider's role definition identifier. This role will define all the permissions that the provider must have on the workspace's container resource group. This role definition cannot have permission to delete the resource group.
createdByoptionalcreatedDateTimeoptional - stringThe date and time stamp when the workspace was created.
managedResourceGroupIdrequired - stringThe managed resource group Id.
parametersoptionalamlWorkspaceIdoptionaltypeoptional - stringThe type of variable that this is.
valuerequired - stringThe value which should be used for this field.
customPrivateSubnetNameoptionaltypeoptional - stringThe type of variable that this is.
valuerequired - stringThe value which should be used for this field.
customPublicSubnetNameoptionaltypeoptional - stringThe type of variable that this is.
valuerequired - stringThe value which should be used for this field.
customVirtualNetworkIdoptionaltypeoptional - stringThe type of variable that this is.
valuerequired - stringThe value which should be used for this field.
enableNoPublicIpoptionaltypeoptional - stringThe type of variable that this is.
valuerequired - booleanThe value which should be used for this field.
encryptionoptionaltypeoptional - stringThe type of variable that this is.
valueoptionalKeyNameoptional - stringThe name of KeyVault key.
keySourceoptional - stringThe encryption keySource (provider). Possible values (case-insensitive): Default, Microsoft.Keyvault.
keyvaulturioptional - stringThe Uri of KeyVault.
keyversionoptional - stringThe version of KeyVault key.
loadBalancerBackendPoolNameoptionaltypeoptional - stringThe type of variable that this is.
valuerequired - stringThe value which should be used for this field.
loadBalancerIdoptionaltypeoptional - stringThe type of variable that this is.
valuerequired - stringThe value which should be used for this field.
natGatewayNameoptionaltypeoptional - stringThe type of variable that this is.
valuerequired - stringThe value which should be used for this field.
prepareEncryptionoptionaltypeoptional - stringThe type of variable that this is.
valuerequired - booleanThe value which should be used for this field.
publicIpNameoptionaltypeoptional - stringThe type of variable that this is.
valuerequired - stringThe value which should be used for this field.
requireInfrastructureEncryptionoptionaltypeoptional - stringThe type of variable that this is.
valuerequired - booleanThe value which should be used for this field.
storageAccountNameoptionaltypeoptional - stringThe type of variable that this is.
valuerequired - stringThe value which should be used for this field.
storageAccountSkuNameoptionaltypeoptional - stringThe type of variable that this is.
valuerequired - stringThe value which should be used for this field.
vnetAddressPrefixoptionaltypeoptional - stringThe type of variable that this is.
valuerequired - stringThe value which should be used for this field.
storageAccountIdentityoptionaluiDefinitionUrioptional - stringThe blob URI where the UI definition file is located.
updatedByoptional
skuoptionalnamerequired - stringThe SKU name.
tieroptional - stringThe SKU tier.
tagsoptional - stringResource tags.
typerequired - string
Frequently asked questions
What is Azure Databricks Workspace?
Azure Databricks Workspace is a resource for Databricks of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Databricks Workspace?
For Terraform, the gilyas/infracost, jvaquero24/DataBricks and johhess40/Terraform source code examples are useful. See the Terraform Example section for further details.
For Azure Resource Manager, the yuncmsft/swagger, yuncmsft/swagger and assing/alerts-extension source code examples are useful. See the Azure Resource Manager Example section for further details.