-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path01_Create_Databricks_Workspace.bicep
40 lines (33 loc) · 1.41 KB
/
01_Create_Databricks_Workspace.bicep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@description('Specifies whether to deploy Azure Databricks workspace with Secure Cluster Connectivity (No Public IP) enabled or not')
param disablePublicIp bool = false
@description('The name of the Azure Databricks workspace to create.')
param workspaceName string = 'adb'
@description('The pricing tier of workspace.')
@allowed([
'standard'
'premium'
])
param pricingTier string = 'premium'
@description('Location for all resources.')
param location string = resourceGroup().location
var managedResourceGroupName = 'databricks-rg-${workspaceName}-${uniqueString(workspaceName, resourceGroup().id)}'
var trimmedMRGName = substring(managedResourceGroupName, 0, min(length(managedResourceGroupName), 90))
var managedResourceGroupId = '${subscription().id}/resourceGroups/${trimmedMRGName}'
resource workspace 'Microsoft.Databricks/workspaces@2024-05-01' = {
name: '${workspaceName}-${uniqueString(workspaceName, resourceGroup().id)}'
location: location
sku: {
name: pricingTier
}
properties: {
managedResourceGroupId: managedResourceGroupId
parameters: {
enableNoPublicIp: {
value: disablePublicIp
}
}
}
}
output workspace object = workspace
// az deployment group create --resource-group rg-<your_login> --template-file .\01_Create_Databricks_Workspace.bicep --what-if
// az deployment group create --resource-group rg-<your_login> --template-file .\01_Create_Databricks_Workspace.bicep