Skip to content

Commit

Permalink
feat: Updated Synapse Workspace CMK Implementation (#3854)
Browse files Browse the repository at this point in the history
## Description

- Updated Synapse Workspace CMK Implementation
- Implemented AVM-Common-Types

Linked to 
- Update CMK implementations as per
#2842 (comment)
- Docs Update: Azure/Azure-Verified-Modules#1683
- UDT update: #3724

## 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%2FcmkUpdateSynapseWorkspace&event=workflow_dispatch)](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.synapse.workspace.yml)
|

## Type of Change

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

- [ ] Update to CI Environment or utilities (Non-module affecting
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.
- [ ] 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
  • Loading branch information
AlexanderSehr authored Nov 29, 2024
1 parent 822542f commit 5655db2
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 29 deletions.
5 changes: 3 additions & 2 deletions avm/res/synapse/workspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ The customer managed key definition.

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, the deployment will use the latest version available at deployment time. |
| [`userAssignedIdentityResourceId`](#parameter-customermanagedkeyuserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use. |

### Parameter: `customerManagedKey.keyName`
Expand All @@ -1388,7 +1388,7 @@ The resource ID of a key vault to reference a customer managed key for encryptio

### Parameter: `customerManagedKey.keyVersion`

The version of the customer managed key to reference for encryption. If not provided, using 'latest'.
The version of the customer managed key to reference for encryption. If not provided, the deployment will use the latest version available at deployment time.

- Required: No
- Type: string
Expand Down Expand Up @@ -2264,6 +2264,7 @@ This section gives you an overview of all local-referenced module files (i.e., o
| :-- | :-- |
| `br/public:avm/res/network/private-endpoint:0.7.1` | Remote reference |
| `br/public:avm/utl/types/avm-common-types:0.2.1` | Remote reference |
| `br/public:avm/utl/types/avm-common-types:0.4.0` | Remote reference |

## Data Collection

Expand Down
4 changes: 2 additions & 2 deletions avm/res/synapse/workspace/administrators/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "11234358964964275645"
"version": "0.31.92.45157",
"templateHash": "3131107829194392661"
},
"name": "Synapse Workspaces Administrators",
"description": "This module deploys Synapse Workspaces Administrators.",
Expand Down
4 changes: 2 additions & 2 deletions avm/res/synapse/workspace/firewall-rules/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "1410907925603155251"
"version": "0.31.92.45157",
"templateHash": "10752960992939562862"
},
"name": "Synapse Workspaces Firewall Rules",
"description": "This module deploys Synapse Workspaces Firewall Rules.",
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.30.23.60470",
"templateHash": "2875700223215345190"
"version": "0.31.92.45157",
"templateHash": "11560320362047193657"
},
"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.30.23.60470",
"templateHash": "15229329511207297146"
"version": "0.31.92.45157",
"templateHash": "6546933028317944045"
},
"name": "Synapse Workspaces Keys",
"description": "This module deploys a Synapse Workspaces Key.",
Expand Down
4 changes: 2 additions & 2 deletions avm/res/synapse/workspace/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ param defaultDataLakeStorageCreateManagedPrivateEndpoint bool = false
@description('Optional. The Entra ID administrator for the synapse workspace.')
param administrator administratorType?

import { customerManagedKeyType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
import { customerManagedKeyType } from 'br/public:avm/utl/types/avm-common-types:0.4.0'
@description('Optional. The customer managed key definition.')
param customerManagedKey customerManagedKeyType?

Expand Down Expand Up @@ -439,7 +439,7 @@ output resourceGroupName string = resourceGroup().name
output connectivityEndpoints object = workspace.properties.connectivityEndpoints

@description('The principal ID of the system assigned identity.')
output systemAssignedMIPrincipalId string = workspace.?identity.?principalId ?? ''
output systemAssignedMIPrincipalId string? = workspace.?identity.?principalId

@description('The location the resource was deployed into.')
output location string = workspace.location
Expand Down
33 changes: 17 additions & 16 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.30.23.60470",
"templateHash": "14298198840929360566"
"version": "0.31.92.45157",
"templateHash": "4045006487015489345"
},
"name": "Synapse Workspaces",
"description": "This module deploys a Synapse Workspace.",
Expand Down Expand Up @@ -202,7 +202,7 @@
"type": "string",
"nullable": true,
"metadata": {
"description": "Optional. The version of the customer managed key to reference for encryption. If not provided, using 'latest'."
"description": "Optional. The version of the customer managed key to reference for encryption. If not provided, the deployment will use the latest version available at deployment time."
}
},
"userAssignedIdentityResourceId": {
Expand All @@ -214,9 +214,9 @@
}
},
"metadata": {
"description": "An AVM-aligned type for a customer-managed key.",
"description": "An AVM-aligned type for a customer-managed key. To be used if the resource type does not support auto-rotation of the customer-managed key.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.4.0"
}
}
},
Expand Down Expand Up @@ -1008,8 +1008,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "2875700223215345190"
"version": "0.31.92.45157",
"templateHash": "11560320362047193657"
},
"name": "Synapse Workspace Integration Runtimes",
"description": "This module deploys a Synapse Workspace Integration Runtime.",
Expand Down Expand Up @@ -1106,8 +1106,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "6457069339265019781"
"version": "0.31.92.45157",
"templateHash": "9926341982154360350"
}
},
"parameters": {
Expand Down Expand Up @@ -1194,8 +1194,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "15229329511207297146"
"version": "0.31.92.45157",
"templateHash": "6546933028317944045"
},
"name": "Synapse Workspaces Keys",
"description": "This module deploys a Synapse Workspaces Key.",
Expand Down Expand Up @@ -1302,8 +1302,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "11234358964964275645"
"version": "0.31.92.45157",
"templateHash": "3131107829194392661"
},
"name": "Synapse Workspaces Administrators",
"description": "This module deploys Synapse Workspaces Administrators.",
Expand Down Expand Up @@ -1417,8 +1417,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "1410907925603155251"
"version": "0.31.92.45157",
"templateHash": "10752960992939562862"
},
"name": "Synapse Workspaces Firewall Rules",
"description": "This module deploys Synapse Workspaces Firewall Rules.",
Expand Down Expand Up @@ -2288,10 +2288,11 @@
},
"systemAssignedMIPrincipalId": {
"type": "string",
"nullable": true,
"metadata": {
"description": "The principal ID of the system assigned identity."
},
"value": "[coalesce(tryGet(tryGet(reference('workspace', '2021-06-01', 'full'), 'identity'), 'principalId'), '')]"
"value": "[tryGet(tryGet(reference('workspace', '2021-06-01', 'full'), 'identity'), 'principalId')]"
},
"location": {
"type": "string",
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.8",
"version": "0.9",
"pathFilters": [
"./main.json"
]
Expand Down

0 comments on commit 5655db2

Please sign in to comment.