Skip to content

Commit

Permalink
feat: Updated Data-Factory CMK Implementation (#3735)
Browse files Browse the repository at this point in the history
## Description

- Updated Data-Factory 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.data-factory.factory](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.data-factory.factory.yml/badge.svg?branch=users%2Falsehr%2FcmkUpdateDataFactory&event=workflow_dispatch)](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.data-factory.factory.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 Dec 13, 2024
1 parent 2d983db commit 047cf31
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 134 deletions.
12 changes: 10 additions & 2 deletions avm/res/data-factory/factory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,8 @@ 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, the deployment will use the latest version available at deployment time. |
| [`autoRotationEnabled`](#parameter-customermanagedkeyautorotationenabled) | bool | Enable or disable auto-rotating to the latest key version. Default is `true`. If set to `false`, the latest key version at the time of the deployment is used. |
| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using version as per 'autoRotationEnabled' setting. |
| [`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 @@ -823,9 +824,16 @@ The resource ID of a key vault to reference a customer managed key for encryptio
- Required: Yes
- Type: string

### Parameter: `customerManagedKey.autoRotationEnabled`

Enable or disable auto-rotating to the latest key version. Default is `true`. If set to `false`, the latest key version at the time of the deployment is used.

- Required: No
- Type: bool

### Parameter: `customerManagedKey.keyVersion`

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.
The version of the customer managed key to reference for encryption. If not provided, using version as per 'autoRotationEnabled' setting.

- Required: No
- Type: string
Expand Down
4 changes: 2 additions & 2 deletions avm/res/data-factory/factory/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.31.92.45157",
"templateHash": "17596772866018649539"
"version": "0.32.4.45862",
"templateHash": "13126987498401118493"
},
"name": "Data Factory Integration RunTimes",
"description": "This module deploys a Data Factory Managed or Self-Hosted Integration Runtime.",
Expand Down
4 changes: 2 additions & 2 deletions avm/res/data-factory/factory/linked-service/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "13457764496694131729"
"version": "0.32.4.45862",
"templateHash": "4235667434763749307"
},
"name": "Data Factory Linked Service",
"description": "This module deploys a Data Factory Linked Service.",
Expand Down
20 changes: 11 additions & 9 deletions avm/res/data-factory/factory/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ param managedVirtualNetworkName string = ''
param managedPrivateEndpoints managedPrivateEndpointType[] = []

@description('Optional. An array of objects for the configuration of an Integration Runtime.')
param integrationRuntimes integrationRuntimesType = []
param integrationRuntimes integrationRuntimesType[] = []

@description('Optional. An array of objects for the configuration of Linked Services.')
param linkedServices linkedServicesType = []
param linkedServices linkedServicesType[] = []

@description('Optional. Location for all Resources.')
param location string = resourceGroup().location
Expand Down Expand Up @@ -76,14 +76,14 @@ import { managedIdentityAllType } from 'br/public:avm/utl/types/avm-common-types
@description('Optional. The managed identity definition for this resource.')
param managedIdentities managedIdentityAllType?

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

import { privateEndpointMultiServiceType } from 'br/public:avm/utl/types/avm-common-types:0.4.0'
@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
param privateEndpoints privateEndpointMultiServiceType[]?

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

import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.4.0'
@description('Optional. Array of role assignments to create.')
param roleAssignments roleAssignmentType[]?
Expand Down Expand Up @@ -218,7 +218,9 @@ resource dataFactory 'Microsoft.DataFactory/factories@2018-06-01' = {
keyName: customerManagedKey!.keyName
keyVersion: !empty(customerManagedKey.?keyVersion ?? '')
? customerManagedKey!.keyVersion
: last(split(cMKKeyVault::cMKKey.properties.keyUriWithVersion, '/'))
: (customerManagedKey.?autoRotationEnabled ?? true)
? null
: last(split(cMKKeyVault::cMKKey.properties.keyUriWithVersion, '/'))
vaultBaseUrl: cMKKeyVault.properties.vaultUri
}
: null
Expand Down Expand Up @@ -438,7 +440,7 @@ type integrationRuntimesType = {

@description('Optional. Integration Runtime type properties. Required if type is "Managed".')
typeProperties: object?
}[]
}

@export()
type linkedServicesType = {
Expand All @@ -459,4 +461,4 @@ type linkedServicesType = {

@description('Optional. The description of the Integration Runtime.')
description: string?
}[]
}
Loading

0 comments on commit 047cf31

Please sign in to comment.