Skip to content

Commit 246a9ef

Browse files
authored
fix: AKS - Key Vault naming in max test + trigger of publishing (#6526)
## Description - Fixed Key Vault naming in max test to ensure uniqueness by adding a time-based unique suffix - Prevents conflicts when running tests multiple times with purge protection enabled - Minor fixes to the AKS Managed Cluster module to trigger the Publishing. - Updated `windowsProfile` parameter description ## Pipeline Reference <!-- Insert your Pipeline Status Badge below --> | Pipeline | | -------- | | [![avm.res.container-service.managed-cluster](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.container-service.managed-cluster.yml/badge.svg?branch=users%2Fkrbar%2FaksKeyVaultFix)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.container-service.managed-cluster.yml) | ## Type of Change <!-- Use the checkboxes [x] on the options that are relevant. --> - Azure Verified Module updates: - [x] Bugfix containing backwards-compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in `version.json`: - [ ] 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 - [ ] Update to CI Environment or utilities (Non-module affecting changes) ## 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 - [x] I have updated the module's CHANGELOG.md file with an entry for the next version <!-- Please keep up to date with the contribution guide at https://aka.ms/avm/contribute/bicep -->
1 parent 2f9462d commit 246a9ef

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

avm/res/container-service/managed-cluster/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3249,7 +3249,7 @@ param tags = {
32493249
| [`tags`](#parameter-tags) | object | Tags of the resource. |
32503250
| [`upgradeSettings`](#parameter-upgradesettings) | object | Settings for upgrading the cluster with override options. |
32513251
| [`webApplicationRoutingEnabled`](#parameter-webapplicationroutingenabled) | bool | Specifies whether the webApplicationRoutingEnabled add-on is enabled or not. |
3252-
| [`windowsProfile`](#parameter-windowsprofile) | object | The Windows profile for Windows VMs in the Managed Cluster. |
3252+
| [`windowsProfile`](#parameter-windowsprofile) | object | The profile for Windows VMs in the Managed Cluster. |
32533253
| [`workloadAutoScalerProfile`](#parameter-workloadautoscalerprofile) | object | Workload Auto-scaler profile for the managed cluster. |
32543254

32553255
### Parameter: `name`
@@ -5207,7 +5207,7 @@ Specifies whether the webApplicationRoutingEnabled add-on is enabled or not.
52075207

52085208
### Parameter: `windowsProfile`
52095209

5210-
The Windows profile for Windows VMs in the Managed Cluster.
5210+
The profile for Windows VMs in the Managed Cluster.
52115211

52125212
- Required: No
52135213
- Type: object

avm/res/container-service/managed-cluster/main.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ param fqdnSubdomain string?
274274
@description('Optional. Settings for upgrading the cluster with override options.')
275275
param upgradeSettings resourceInput<'Microsoft.ContainerService/managedClusters@2025-09-01'>.properties.upgradeSettings?
276276

277-
@description('Optional. The Windows profile for Windows VMs in the Managed Cluster.')
277+
@description('Optional. The profile for Windows VMs in the Managed Cluster.')
278278
param windowsProfile resourceInput<'Microsoft.ContainerService/managedClusters@2025-09-01'>.properties.windowsProfile?
279279

280280
// =========== //

avm/res/container-service/managed-cluster/main.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"_generator": {
77
"name": "bicep",
88
"version": "0.40.2.10011",
9-
"templateHash": "17624608039137841174"
9+
"templateHash": "15481335468407716579"
1010
},
1111
"name": "Azure Kubernetes Service (AKS) Managed Clusters",
1212
"description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster."
@@ -1605,7 +1605,7 @@
16051605
"__bicep_resource_derived_type!": {
16061606
"source": "Microsoft.ContainerService/managedClusters@2025-09-01#properties/properties/properties/windowsProfile"
16071607
},
1608-
"description": "Optional. The Windows profile for Windows VMs in the Managed Cluster."
1608+
"description": "Optional. The profile for Windows VMs in the Managed Cluster."
16091609
},
16101610
"nullable": true
16111611
}

avm/res/container-service/managed-cluster/tests/e2e/max/main.test.bicep

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ param resourceGroupName string = 'dep-${namePrefix}-containerservice.managedclus
1414
@description('Optional. The location to deploy resources to.')
1515
param resourceLocation string = deployment().location
1616

17+
@description('Generated. Used as a basis for unique resource names.')
18+
param baseTime string = utcNow('u')
19+
1720
@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.')
1821
param serviceShort string = 'csmax'
1922

@@ -35,7 +38,8 @@ module nestedDependencies 'dependencies.bicep' = {
3538
publicIPName: 'dep-${namePrefix}-pip-${serviceShort}'
3639
publicIPAKSName: 'dep-${namePrefix}-pip-aks-${serviceShort}'
3740
diskEncryptionSetName: 'dep-${namePrefix}-des-${serviceShort}'
38-
keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}'
41+
// Adding base time to make the name unique as purge protection is enabled (but may not be longer than 24 characters total)
42+
keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
3943
sshDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}'
4044
sshKeyName: 'dep-${namePrefix}-ssh-${serviceShort}'
4145
}

0 commit comments

Comments
 (0)