Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Databricks - Aligned PE test with latest schema #3399

Merged
merged 4 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 39 additions & 11 deletions avm/res/databricks/workspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,13 @@ module workspace 'br/public:avm/res/databricks/workspace:<version>' = {
prepareEncryption: true
privateEndpoints: [
{
privateDnsZoneResourceIds: [
'<privateDNSZoneResourceId>'
]
privateDnsZoneGroup: {
privateDnsZoneGroupConfigs: [
{
privateDnsZoneResourceId: '<privateDnsZoneResourceId>'
}
]
}
service: 'databricks_ui_api'
subnetResourceId: '<subnetResourceId>'
tags: {
Expand Down Expand Up @@ -724,9 +728,13 @@ module workspace 'br/public:avm/res/databricks/workspace:<version>' = {
"privateEndpoints": {
"value": [
{
"privateDnsZoneResourceIds": [
"<privateDNSZoneResourceId>"
],
"privateDnsZoneGroup": {
"privateDnsZoneGroupConfigs": [
{
"privateDnsZoneResourceId": "<privateDnsZoneResourceId>"
}
]
},
"service": "databricks_ui_api",
"subnetResourceId": "<subnetResourceId>",
"tags": {
Expand Down Expand Up @@ -850,9 +858,13 @@ param natGatewayName = 'nat-gateway'
param prepareEncryption = true
param privateEndpoints = [
{
privateDnsZoneResourceIds: [
'<privateDNSZoneResourceId>'
]
privateDnsZoneGroup: {
privateDnsZoneGroupConfigs: [
{
privateDnsZoneResourceId: '<privateDnsZoneResourceId>'
}
]
}
service: 'databricks_ui_api'
subnetResourceId: '<subnetResourceId>'
tags: {
Expand Down Expand Up @@ -1635,6 +1647,17 @@ Array of role assignments to create.

- Required: No
- Type: array
- Roles configurable by name:
- `'Contributor'`
- `'DNS Resolver Contributor'`
- `'DNS Zone Contributor'`
- `'Domain Services Contributor'`
- `'Domain Services Reader'`
- `'Network Contributor'`
- `'Owner'`
- `'Private DNS Zone Contributor'`
- `'Reader'`
- `'Role Based Access Control Administrator (Preview)'`

**Required parameters**

Expand Down Expand Up @@ -2221,10 +2244,15 @@ Array of role assignments to create.
- Type: array
- Roles configurable by name:
- `'Contributor'`
- `'DNS Resolver Contributor'`
- `'DNS Zone Contributor'`
- `'Domain Services Contributor'`
- `'Domain Services Reader'`
- `'Network Contributor'`
- `'Owner'`
- `'Private DNS Zone Contributor'`
- `'Reader'`
- `'Role Based Access Control Administrator'`
- `'User Access Administrator'`
- `'Role Based Access Control Administrator (Preview)'`

**Required parameters**

Expand Down
12 changes: 6 additions & 6 deletions avm/res/databricks/workspace/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ var _storageAccountId = resourceId(
)

@batchSize(1)
module storageAccount_privateEndpoints 'br/public:avm/res/network/private-endpoint:0.7.1' = [
module storageAccount_storageAccountPrivateEndpoints 'br/public:avm/res/network/private-endpoint:0.7.1' = [
for (privateEndpoint, index) in (storageAccountPrivateEndpoints ?? []): if (privateStorageAccount == 'Enabled') {
name: '${uniqueString(deployment().name, location)}-workspacestorage-PrivateEndpoint-${index}'
scope: resourceGroup(privateEndpoint.?resourceGroupName ?? '')
Expand Down Expand Up @@ -553,11 +553,11 @@ output storagePrivateEndpoints array = [
for (pe, i) in ((!empty(storageAccountPrivateEndpoints) && privateStorageAccount == 'Enabled')
? array(storageAccountPrivateEndpoints)
: []): {
name: storageAccount_privateEndpoints[i].outputs.name
resourceId: storageAccount_privateEndpoints[i].outputs.resourceId
groupId: storageAccount_privateEndpoints[i].outputs.groupId
customDnsConfig: storageAccount_privateEndpoints[i].outputs.customDnsConfig
networkInterfaceIds: storageAccount_privateEndpoints[i].outputs.networkInterfaceIds
name: storageAccount_storageAccountPrivateEndpoints[i].outputs.name
resourceId: storageAccount_storageAccountPrivateEndpoints[i].outputs.resourceId
groupId: storageAccount_storageAccountPrivateEndpoints[i].outputs.groupId
customDnsConfig: storageAccount_storageAccountPrivateEndpoints[i].outputs.customDnsConfig
networkInterfaceIds: storageAccount_storageAccountPrivateEndpoints[i].outputs.networkInterfaceIds
}
]

Expand Down
18 changes: 9 additions & 9 deletions avm/res/databricks/workspace/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "8011778884263076951"
"version": "0.30.23.60470",
"templateHash": "7919315590916710106"
},
"name": "Azure Databricks Workspaces",
"description": "This module deploys an Azure Databricks Workspace.",
Expand Down Expand Up @@ -1678,9 +1678,9 @@
"workspace"
]
},
"storageAccount_privateEndpoints": {
"storageAccount_storageAccountPrivateEndpoints": {
"copy": {
"name": "storageAccount_privateEndpoints",
"name": "storageAccount_storageAccountPrivateEndpoints",
"count": "[length(coalesce(parameters('storageAccountPrivateEndpoints'), createArray()))]",
"mode": "serial",
"batchSize": 1
Expand Down Expand Up @@ -2543,11 +2543,11 @@
"copy": {
"count": "[length(if(and(not(empty(parameters('storageAccountPrivateEndpoints'))), equals(parameters('privateStorageAccount'), 'Enabled')), array(parameters('storageAccountPrivateEndpoints')), createArray()))]",
"input": {
"name": "[reference(format('storageAccount_privateEndpoints[{0}]', copyIndex())).outputs.name.value]",
"resourceId": "[reference(format('storageAccount_privateEndpoints[{0}]', copyIndex())).outputs.resourceId.value]",
"groupId": "[reference(format('storageAccount_privateEndpoints[{0}]', copyIndex())).outputs.groupId.value]",
"customDnsConfig": "[reference(format('storageAccount_privateEndpoints[{0}]', copyIndex())).outputs.customDnsConfig.value]",
"networkInterfaceIds": "[reference(format('storageAccount_privateEndpoints[{0}]', copyIndex())).outputs.networkInterfaceIds.value]"
"name": "[reference(format('storageAccount_storageAccountPrivateEndpoints[{0}]', copyIndex())).outputs.name.value]",
"resourceId": "[reference(format('storageAccount_storageAccountPrivateEndpoints[{0}]', copyIndex())).outputs.resourceId.value]",
"groupId": "[reference(format('storageAccount_storageAccountPrivateEndpoints[{0}]', copyIndex())).outputs.groupId.value]",
"customDnsConfig": "[reference(format('storageAccount_storageAccountPrivateEndpoints[{0}]', copyIndex())).outputs.customDnsConfig.value]",
"networkInterfaceIds": "[reference(format('storageAccount_storageAccountPrivateEndpoints[{0}]', copyIndex())).outputs.networkInterfaceIds.value]"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,13 @@ module testDeployment '../../../main.bicep' = [
customVirtualNetworkResourceId: nestedDependencies.outputs.virtualNetworkResourceId
privateEndpoints: [
{
privateDnsZoneResourceIds: [
nestedDependencies.outputs.privateDNSZoneResourceId
]
privateDnsZoneGroup: {
privateDnsZoneGroupConfigs: [
{
privateDnsZoneResourceId: nestedDependencies.outputs.privateDNSZoneResourceId
}
]
}
service: 'databricks_ui_api'
subnetResourceId: nestedDependencies.outputs.defaultSubnetResourceId
tags: {
Expand Down