Skip to content

Commit

Permalink
fix: Enabled custom configuration of accountUrl parameter (#1723)
Browse files Browse the repository at this point in the history
## Description

Enabled custom configuration of `accountUrl` parameter

Closes #1690

## Pipeline Reference

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

| Pipeline |
| -------- |
|
[![avm.res.synapse.workspace](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.synapse.workspace.yml/badge.svg?branch=users%2Falsehr%2F1690_accountUrl&event=workflow_dispatch)](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.synapse.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)
- [ ] Azure Verified Module updates:
- [x] 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.
- [ ] 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

---------

Co-authored-by: Erika Gressi <[email protected]>
  • Loading branch information
AlexanderSehr and eriqua authored Apr 28, 2024
1 parent b78be90 commit c03725b
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 15 deletions.
9 changes: 9 additions & 0 deletions avm/res/synapse/workspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ module workspace 'br/public:avm/res/synapse/workspace:<version>' = {

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`accountUrl`](#parameter-accounturl) | string | The account URL of the data lake storage account. |
| [`allowedAadTenantIdsForLinking`](#parameter-allowedaadtenantidsforlinking) | array | Allowed AAD Tenant IDs For Linking. |
| [`azureADOnlyAuthentication`](#parameter-azureadonlyauthentication) | bool | Enable or Disable AzureADOnlyAuthentication on All Workspace sub-resource. |
| [`customerManagedKey`](#parameter-customermanagedkey) | object | The customer managed key definition. |
Expand Down Expand Up @@ -809,6 +810,14 @@ Login for administrator access to the workspace's SQL pools.
- Required: Yes
- Type: string

### Parameter: `accountUrl`

The account URL of the data lake storage account.

- Required: No
- Type: string
- Default: `[format('https://{0}.dfs.{1}', last(split(parameters('defaultDataLakeStorageAccountResourceId'), '/')), environment().suffixes.storage)]`

### Parameter: `allowedAadTenantIdsForLinking`

Allowed AAD Tenant IDs For Linking.
Expand Down
4 changes: 2 additions & 2 deletions avm/res/synapse/workspace/integration-runtime/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "3692817517911366371"
"version": "0.26.170.59819",
"templateHash": "12068224449891293218"
},
"name": "Synapse Workspace Integration Runtimes",
"description": "This module deploys a Synapse Workspace Integration Runtime.",
Expand Down
4 changes: 2 additions & 2 deletions avm/res/synapse/workspace/key/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "4754954307876642999"
"version": "0.26.170.59819",
"templateHash": "15295521192306502787"
},
"name": "Synapse Workspaces Keys",
"description": "This module deploys a Synapse Workspaces Key.",
Expand Down
5 changes: 4 additions & 1 deletion avm/res/synapse/workspace/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ param sqlAdministratorLogin string
@secure()
param sqlAdministratorLoginPassword string = ''

@description('Optional. The account URL of the data lake storage account.')
param accountUrl string = 'https://${last(split(defaultDataLakeStorageAccountResourceId, '/'))!}.dfs.${environment().suffixes.storage}'

@description('Optional. Git integration settings.')
param workspaceRepositoryConfiguration object?

Expand Down Expand Up @@ -186,7 +189,7 @@ resource workspace 'Microsoft.Synapse/workspaces@2021-06-01' = {
: null
defaultDataLakeStorage: {
resourceId: defaultDataLakeStorageAccountResourceId
accountUrl: 'https://${last(split(defaultDataLakeStorageAccountResourceId, '/'))!}.dfs.${environment().suffixes.storage}'
accountUrl: accountUrl
filesystem: defaultDataLakeStorageFilesystem
createManagedPrivateEndpoint: managedVirtualNetwork ? defaultDataLakeStorageCreateManagedPrivateEndpoint : null
}
Expand Down
25 changes: 16 additions & 9 deletions avm/res/synapse/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.25.3.34343",
"templateHash": "14051939023718187274"
"version": "0.26.170.59819",
"templateHash": "9840642184886177634"
},
"name": "Synapse Workspaces",
"description": "This module deploys a Synapse Workspace.",
Expand Down Expand Up @@ -585,6 +585,13 @@
"description": "Optional. Password for administrator access to the workspace's SQL pools. If you don't provide a password, one will be automatically generated. You can change the password later."
}
},
"accountUrl": {
"type": "string",
"defaultValue": "[format('https://{0}.dfs.{1}', last(split(parameters('defaultDataLakeStorageAccountResourceId'), '/')), environment().suffixes.storage)]",
"metadata": {
"description": "Optional. The account URL of the data lake storage account."
}
},
"workspaceRepositoryConfiguration": {
"type": "object",
"nullable": true,
Expand Down Expand Up @@ -703,7 +710,7 @@
"cspWorkspaceAdminProperties": "[if(not(empty(parameters('initialWorkspaceAdminObjectID'))), createObject('initialWorkspaceAdminObjectId', parameters('initialWorkspaceAdminObjectID')), null())]",
"defaultDataLakeStorage": {
"resourceId": "[parameters('defaultDataLakeStorageAccountResourceId')]",
"accountUrl": "[format('https://{0}.dfs.{1}', last(split(parameters('defaultDataLakeStorageAccountResourceId'), '/')), environment().suffixes.storage)]",
"accountUrl": "[parameters('accountUrl')]",
"filesystem": "[parameters('defaultDataLakeStorageFilesystem')]",
"createManagedPrivateEndpoint": "[if(parameters('managedVirtualNetwork'), parameters('defaultDataLakeStorageCreateManagedPrivateEndpoint'), null())]"
},
Expand Down Expand Up @@ -811,8 +818,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.25.3.34343",
"templateHash": "10907909212229865317"
"version": "0.26.170.59819",
"templateHash": "12068224449891293218"
},
"name": "Synapse Workspace Integration Runtimes",
"description": "This module deploys a Synapse Workspace Integration Runtime.",
Expand Down Expand Up @@ -909,8 +916,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.25.3.34343",
"templateHash": "6689684157194442067"
"version": "0.26.170.59819",
"templateHash": "23966606142695564"
}
},
"parameters": {
Expand Down Expand Up @@ -997,8 +1004,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.25.3.34343",
"templateHash": "13839822979779705807"
"version": "0.26.170.59819",
"templateHash": "15295521192306502787"
},
"name": "Synapse Workspaces Keys",
"description": "This module deploys a Synapse Workspaces Key.",
Expand Down
2 changes: 1 addition & 1 deletion avm/res/synapse/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.4",
"version": "0.5",
"pathFilters": [
"./main.json"
]
Expand Down

0 comments on commit c03725b

Please sign in to comment.