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
-
id
optional computed - string -
location
required - string -
managed_resource_group_id
optional computed - string -
managed_resource_group_name
optional computed - string -
name
required - string -
resource_group_name
required - string -
sku
required - string -
tags
optional - map from string to string -
workspace_id
optional computed - string -
workspace_url
optional computed - string -
custom_parameters
list block-
no_public_ip
optional - bool -
private_subnet_name
optional - string -
public_subnet_name
optional - string -
virtual_network_id
optional - string
-
-
timeouts
single 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
apiVersion
required - stringlocation
required - stringThe geo-location where the resource lives
name
required - stringThe name of the workspace.
properties
requiredauthorizations
optional arrayprincipalId
required - stringThe provider's principal identifier. This is the identity that the provider will use to call ARM to manage the workspace resources.
roleDefinitionId
required - 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.
createdBy
optionalcreatedDateTime
optional - stringThe date and time stamp when the workspace was created.
managedResourceGroupId
required - stringThe managed resource group Id.
parameters
optionalamlWorkspaceId
optionaltype
optional - stringThe type of variable that this is.
value
required - stringThe value which should be used for this field.
customPrivateSubnetName
optionaltype
optional - stringThe type of variable that this is.
value
required - stringThe value which should be used for this field.
customPublicSubnetName
optionaltype
optional - stringThe type of variable that this is.
value
required - stringThe value which should be used for this field.
customVirtualNetworkId
optionaltype
optional - stringThe type of variable that this is.
value
required - stringThe value which should be used for this field.
enableNoPublicIp
optionaltype
optional - stringThe type of variable that this is.
value
required - booleanThe value which should be used for this field.
encryption
optionaltype
optional - stringThe type of variable that this is.
value
optionalKeyName
optional - stringThe name of KeyVault key.
keySource
optional - stringThe encryption keySource (provider). Possible values (case-insensitive): Default, Microsoft.Keyvault.
keyvaulturi
optional - stringThe Uri of KeyVault.
keyversion
optional - stringThe version of KeyVault key.
loadBalancerBackendPoolName
optionaltype
optional - stringThe type of variable that this is.
value
required - stringThe value which should be used for this field.
loadBalancerId
optionaltype
optional - stringThe type of variable that this is.
value
required - stringThe value which should be used for this field.
natGatewayName
optionaltype
optional - stringThe type of variable that this is.
value
required - stringThe value which should be used for this field.
prepareEncryption
optionaltype
optional - stringThe type of variable that this is.
value
required - booleanThe value which should be used for this field.
publicIpName
optionaltype
optional - stringThe type of variable that this is.
value
required - stringThe value which should be used for this field.
requireInfrastructureEncryption
optionaltype
optional - stringThe type of variable that this is.
value
required - booleanThe value which should be used for this field.
storageAccountName
optionaltype
optional - stringThe type of variable that this is.
value
required - stringThe value which should be used for this field.
storageAccountSkuName
optionaltype
optional - stringThe type of variable that this is.
value
required - stringThe value which should be used for this field.
vnetAddressPrefix
optionaltype
optional - stringThe type of variable that this is.
value
required - stringThe value which should be used for this field.
storageAccountIdentity
optionaluiDefinitionUri
optional - stringThe blob URI where the UI definition file is located.
updatedBy
optional
sku
optionalname
required - stringThe SKU name.
tier
optional - stringThe SKU tier.
tags
optional - stringResource tags.
type
required - 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.