Skip to content

Commit

Permalink
feat: Updated Automation-Account CMK Implementation (#3730)
Browse files Browse the repository at this point in the history
## Description

- Updated Automation-Account 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.automation.automation-account](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.automation.automation-account.yml/badge.svg?branch=users%2Falsehr%2FcmkUpdateAppConfig&event=workflow_dispatch)](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.automation.automation-account.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 5655db2 commit fee3bbd
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 59 deletions.
6 changes: 3 additions & 3 deletions avm/res/automation/automation-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1756,7 +1756,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 @@ -1775,7 +1775,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 @@ -2714,7 +2714,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/res/operations-management/solution:0.3.0` | 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/automation/automation-account/credential/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": "12611107514388164926"
"version": "0.31.92.45157",
"templateHash": "3177693922733831864"
},
"name": "Automation Account Credential",
"description": "This module deploys Azure Automation Account Credential.",
Expand Down
4 changes: 2 additions & 2 deletions avm/res/automation/automation-account/job-schedule/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": "4313990302593445827"
"version": "0.31.92.45157",
"templateHash": "1973660029373842500"
},
"name": "Automation Account Job Schedules",
"description": "This module deploys an Azure Automation Account Job Schedule.",
Expand Down
14 changes: 7 additions & 7 deletions avm/res/automation/automation-account/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ param location string = resourceGroup().location
])
param skuName string = 'Basic'

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 @@ -57,23 +57,23 @@ param publicNetworkAccess string = ''
@description('Optional. Disable local authentication profile used within the resource.')
param disableLocalAuth bool = true

import { privateEndpointMultiServiceType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
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 { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.4.0'
@description('Optional. The diagnostic settings of the service.')
param diagnosticSettings diagnosticSettingFullType[]?

import { managedIdentityAllType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
import { managedIdentityAllType } from 'br/public:avm/utl/types/avm-common-types:0.4.0'
@description('Optional. The managed identity definition for this resource.')
param managedIdentities managedIdentityAllType?

import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.4.0'
@description('Optional. The lock settings of the service.')
param lock lockType?

import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
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 @@ -514,7 +514,7 @@ output resourceId string = automationAccount.id
output resourceGroupName string = resourceGroup().name

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

@description('The location the resource was deployed into.')
output location string = automationAccount.location
Expand Down
61 changes: 31 additions & 30 deletions avm/res/automation/automation-account/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": "5140090215914688680"
"version": "0.31.92.45157",
"templateHash": "7064248988534134732"
},
"name": "Automation Accounts",
"description": "This module deploys an Azure Automation Account.",
Expand Down Expand Up @@ -88,7 +88,7 @@
},
"metadata": {
"__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 @@ -130,7 +130,7 @@
},
"metadata": {
"__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 @@ -171,7 +171,7 @@
},
"metadata": {
"__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 All @@ -194,7 +194,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 @@ -206,9 +206,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 @@ -330,7 +330,7 @@
"metadata": {
"description": "An AVM-aligned type for a diagnostic setting. To be used if both logs & metrics are supported by the resource provider.",
"__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 @@ -360,7 +360,7 @@
"metadata": {
"description": "An AVM-aligned type for a lock.",
"__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 @@ -388,7 +388,7 @@
"metadata": {
"description": "An AVM-aligned type for a managed identity configuration. To be used if both a system-assigned & user-assigned identities are supported by the resource provider.",
"__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 @@ -529,7 +529,7 @@
"metadata": {
"description": "An AVM-aligned type for a private endpoint. To be used if the private endpoint's default service / groupId can NOT be assumed (i.e., for services that have more than one subresource, like Storage Account with Blob (blob, table, queue, file, ...).",
"__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 @@ -604,7 +604,7 @@
"metadata": {
"description": "An AVM-aligned type for a role assignment.",
"__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 @@ -1025,8 +1025,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "12611107514388164926"
"version": "0.31.92.45157",
"templateHash": "3177693922733831864"
},
"name": "Automation Account Credential",
"description": "This module deploys Azure Automation Account Credential.",
Expand Down Expand Up @@ -1155,8 +1155,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "15453846545391026191"
"version": "0.31.92.45157",
"templateHash": "1826826272421943582"
},
"name": "Automation Account Modules",
"description": "This module deploys an Azure Automation Account Module.",
Expand Down Expand Up @@ -1311,8 +1311,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "18156490457024191308"
"version": "0.31.92.45157",
"templateHash": "9390427400811966884"
},
"name": "Automation Account Schedules",
"description": "This module deploys an Azure Automation Account Schedule.",
Expand Down Expand Up @@ -1496,8 +1496,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "12957326312361613170"
"version": "0.31.92.45157",
"templateHash": "17488627496732697335"
},
"name": "Automation Account Runbooks",
"description": "This module deploys an Azure Automation Account Runbook.",
Expand Down Expand Up @@ -1704,8 +1704,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "4313990302593445827"
"version": "0.31.92.45157",
"templateHash": "1973660029373842500"
},
"name": "Automation Account Job Schedules",
"description": "This module deploys an Azure Automation Account Job Schedule.",
Expand Down Expand Up @@ -1836,8 +1836,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "11786120333296513300"
"version": "0.31.92.45157",
"templateHash": "11138609945914911372"
},
"name": "Automation Account Variables",
"description": "This module deploys an Azure Automation Account Variable.",
Expand Down Expand Up @@ -1951,8 +1951,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "9587193864623256690"
"version": "0.31.92.45157",
"templateHash": "127660536760800360"
},
"name": "Log Analytics Workspace Linked Services",
"description": "This module deploys a Log Analytics Workspace Linked Service.",
Expand Down Expand Up @@ -2354,8 +2354,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "1633069486738674821"
"version": "0.31.92.45157",
"templateHash": "10379683657935183144"
},
"name": "Automation Account Software Update Configurations",
"description": "This module deploys an Azure Automation Account Software Update Configuration.",
Expand Down Expand Up @@ -3565,10 +3565,11 @@
},
"systemAssignedMIPrincipalId": {
"type": "string",
"nullable": true,
"metadata": {
"description": "The principal ID of the system assigned identity."
},
"value": "[coalesce(tryGet(tryGet(reference('automationAccount', '2022-08-08', 'full'), 'identity'), 'principalId'), '')]"
"value": "[tryGet(tryGet(reference('automationAccount', '2022-08-08', 'full'), 'identity'), 'principalId')]"
},
"location": {
"type": "string",
Expand Down
4 changes: 2 additions & 2 deletions avm/res/automation/automation-account/module/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": "15453846545391026191"
"version": "0.31.92.45157",
"templateHash": "1826826272421943582"
},
"name": "Automation Account Modules",
"description": "This module deploys an Azure Automation Account Module.",
Expand Down
4 changes: 2 additions & 2 deletions avm/res/automation/automation-account/runbook/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": "12957326312361613170"
"version": "0.31.92.45157",
"templateHash": "17488627496732697335"
},
"name": "Automation Account Runbooks",
"description": "This module deploys an Azure Automation Account Runbook.",
Expand Down
4 changes: 2 additions & 2 deletions avm/res/automation/automation-account/schedule/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": "18156490457024191308"
"version": "0.31.92.45157",
"templateHash": "9390427400811966884"
},
"name": "Automation Account Schedules",
"description": "This module deploys an Azure Automation Account Schedule.",
Expand Down
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": "1633069486738674821"
"version": "0.31.92.45157",
"templateHash": "10379683657935183144"
},
"name": "Automation Account Software Update Configurations",
"description": "This module deploys an Azure Automation Account Software Update Configuration.",
Expand Down
4 changes: 2 additions & 2 deletions avm/res/automation/automation-account/variable/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": "11786120333296513300"
"version": "0.31.92.45157",
"templateHash": "11138609945914911372"
},
"name": "Automation Account Variables",
"description": "This module deploys an Azure Automation Account Variable.",
Expand Down
10 changes: 5 additions & 5 deletions avm/res/automation/automation-account/version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "0.10",
"pathFilters": [
"./main.json"
]
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "0.11",
"pathFilters": [
"./main.json"
]
}

0 comments on commit fee3bbd

Please sign in to comment.