Skip to content

Commit

Permalink
feat: Additional outputs to the avm/res/databricks/workspace module (
Browse files Browse the repository at this point in the history
…#1288)

## Description

Added two additional outputs to the `avm/res/databricks/workspace`
module, useful when configuring the Databricks workspace:
- `workspaceId` 
- `workspaceUrl` 

<!--
>Thank you for your contribution !
> Please include a summary of the change and which issue is fixed.
> Please also include the context.
> List any dependencies that are required for this change.

Fixes #123
Fixes #456
Closes #123
Closes #456
-->

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.databricks.workspace](https://github.com/krbar/bicep-registry-modules/actions/workflows/avm.res.databricks.workspace.yml/badge.svg?branch=users%2Fkrbar%2FdatabricksUpdate)](https://github.com/krbar/bicep-registry-modules/actions/workflows/avm.res.databricks.workspace.yml)
|

## Type of Change

<!-- Use the check-boxes [x] on the options that are relevant. -->

- [ ] Update to CI Environment or utlities (Non-module effecting
changes)
- [x] Azure Verified Module updates:
- [ ] Bugfix containing backwards compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [x] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation

## Checklist

- [x] I'm sure there are no other open Pull Requests for the same
update/change
- [x] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [x] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to day with the contribution guide at
https://aka.ms/avm/contribute/bicep -->
  • Loading branch information
krbar authored May 25, 2024
1 parent e7e666e commit 67c4156
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
2 changes: 2 additions & 0 deletions avm/res/databricks/workspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1510,6 +1510,8 @@ Address prefix for Managed virtual network.
| `resourceId` | string | The resource ID of the deployed databricks workspace. |
| `storageAccountId` | string | The resource ID of the DBFS storage account. |
| `storageAccountName` | string | The name of the DBFS storage account. |
| `workspaceId` | string | The unique identifier of the databricks workspace in databricks control plane. |
| `workspaceUrl` | string | The workspace URL which is of the format 'adb-{workspaceId}.{random}.azuredatabricks.net'. |

## Cross-referenced modules

Expand Down
6 changes: 6 additions & 0 deletions avm/res/databricks/workspace/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,12 @@ output storageAccountId string = resourceId(
workspace.properties.parameters.storageAccountName.value
)

@description('The workspace URL which is of the format \'adb-{workspaceId}.{random}.azuredatabricks.net\'.')
output workspaceUrl string = workspace.properties.workspaceUrl

@description('The unique identifier of the databricks workspace in databricks control plane.')
output workspaceId string = workspace.properties.workspaceId

@description('The private endpoints for the Databricks Workspace.')
output privateEndpoints array = [
for (pe, i) in (!empty(privateEndpoints) ? array(privateEndpoints) : []): {
Expand Down
18 changes: 16 additions & 2 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.26.54.24096",
"templateHash": "8925128185589273318"
"version": "0.26.170.59819",
"templateHash": "7425369674344103053"
},
"name": "Azure Databricks Workspaces",
"description": "This module deploys an Azure Databricks Workspace.",
Expand Down Expand Up @@ -1539,6 +1539,20 @@
},
"value": "[resourceId(last(split(reference('workspace').managedResourceGroupId, '/')), 'microsoft.storage/storageAccounts', reference('workspace').parameters.storageAccountName.value)]"
},
"workspaceUrl": {
"type": "string",
"metadata": {
"description": "The workspace URL which is of the format 'adb-{workspaceId}.{random}.azuredatabricks.net'."
},
"value": "[reference('workspace').workspaceUrl]"
},
"workspaceId": {
"type": "string",
"metadata": {
"description": "The unique identifier of the databricks workspace in databricks control plane."
},
"value": "[reference('workspace').workspaceId]"
},
"privateEndpoints": {
"type": "array",
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion avm/res/databricks/workspace/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "0.3",
"version": "0.4",
"pathFilters": [
"./main.json"
]
Expand Down

0 comments on commit 67c4156

Please sign in to comment.