Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
name: 'standard'
}
tenantId: tenant().tenantId
enablePurgeProtection: null
enablePurgeProtection: true // Required by nodepool vmss
softDeleteRetentionInDays: 7
enabledForTemplateDeployment: true
enabledForDiskEncryption: true
enabledForDeployment: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ param resourceGroupName string = 'ms.containerservice.managedclusters-${serviceS
param location string = deployment().location

@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.')
param serviceShort string = 'csmazure'
param serviceShort string = 'csmaz'

@description('Generated. Used as a basis for unique resource names.')
param baseTime string = utcNow('u')

// =========== //
// Deployments //
Expand All @@ -31,7 +34,8 @@ module resourceGroupResources 'dependencies.bicep' = {
virtualNetworkName: 'dep-<<namePrefix>>-vnet-${serviceShort}'
managedIdentityName: 'dep-<<namePrefix>>-msi-${serviceShort}'
diskEncryptionSetName: 'dep-<<namePrefix>>-des-${serviceShort}'
keyVaultName: 'dep-<<namePrefix>>-kv-${serviceShort}'
// Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
keyVaultName: 'dep-<<namePrefix>>-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena
}
}

resource managedCluster 'Microsoft.ContainerService/managedClusters@2022-07-01' existing = {
resource managedCluster 'Microsoft.ContainerService/managedClusters@2022-09-01' existing = {
name: managedClusterName
}

resource agentPool 'Microsoft.ContainerService/managedClusters/agentPools@2022-07-01' = {
resource agentPool 'Microsoft.ContainerService/managedClusters/agentPools@2022-09-01' = {
name: name
parent: managedCluster
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This module deploys an Agent Pool for a Container Service Managed Cluster

| Resource Type | API Version |
| :-- | :-- |
| `Microsoft.ContainerService/managedClusters/agentPools` | [2022-07-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2022-07-01/managedClusters/agentPools) |
| `Microsoft.ContainerService/managedClusters/agentPools` | [2022-09-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2022-09-01/managedClusters/agentPools) |

## Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena
}
}

resource managedCluster 'Microsoft.ContainerService/managedClusters@2022-07-01' = {
resource managedCluster 'Microsoft.ContainerService/managedClusters@2022-09-01' = {
name: name
location: location
tags: tags
Expand Down Expand Up @@ -465,7 +465,7 @@ resource managedCluster 'Microsoft.ContainerService/managedClusters@2022-07-01'
}
autoScalerProfile: {
'balance-similar-node-groups': autoScalerProfileBalanceSimilarNodeGroups
'expander': autoScalerProfileExpander
expander: autoScalerProfileExpander
'max-empty-bulk-delete': autoScalerProfileMaxEmptyBulkDelete
'max-graceful-termination-sec': autoScalerProfileMaxGracefulTerminationSec
'max-node-provision-time': autoScalerProfileMaxNodeProvisionTime
Expand Down Expand Up @@ -526,7 +526,7 @@ module managedCluster_agentPools 'agentPools/deploy.bicep' = [for (agentPool, in
nodeLabels: contains(agentPool, 'nodeLabels') ? agentPool.nodeLabels : {}
nodePublicIpPrefixId: contains(agentPool, 'nodePublicIpPrefixId') ? agentPool.nodePublicIpPrefixId : ''
nodeTaints: contains(agentPool, 'nodeTaints') ? agentPool.nodeTaints : []
orchestratorVersion: contains(agentPool, 'orchestratorVersion') ? agentPool.orchestratorVersion : ''
orchestratorVersion: contains(agentPool, 'orchestratorVersion') ? agentPool.orchestratorVersion : aksClusterKubernetesVersion
osDiskSizeGB: contains(agentPool, 'osDiskSizeGB') ? agentPool.osDiskSizeGB : -1
osDiskType: contains(agentPool, 'osDiskType') ? agentPool.osDiskType : ''
osSku: contains(agentPool, 'osSku') ? agentPool.osSku : ''
Expand Down
10 changes: 5 additions & 5 deletions modules/Microsoft.ContainerService/managedClusters/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ This module deploys Azure Kubernetes Cluster (AKS).
| :-- | :-- |
| `Microsoft.Authorization/locks` | [2017-04-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2017-04-01/locks) |
| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
| `Microsoft.ContainerService/managedClusters` | [2022-07-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2022-07-01/managedClusters) |
| `Microsoft.ContainerService/managedClusters/agentPools` | [2022-07-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2022-07-01/managedClusters/agentPools) |
| `Microsoft.ContainerService/managedClusters` | [2022-09-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2022-09-01/managedClusters) |
| `Microsoft.ContainerService/managedClusters/agentPools` | [2022-09-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2022-09-01/managedClusters/agentPools) |
| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |

## Parameters
Expand Down Expand Up @@ -381,10 +381,10 @@ The following module usage examples are retrieved from the content of the files

```bicep
module managedClusters './Microsoft.ContainerService/managedClusters/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-test-csmazure'
name: '${uniqueString(deployment().name)}-test-csmaz'
params: {
// Required parameters
name: '<<namePrefix>>csmazure001'
name: '<<namePrefix>>csmaz001'
primaryAgentPoolProfile: [
{
availabilityZones: [
Expand Down Expand Up @@ -494,7 +494,7 @@ module managedClusters './Microsoft.ContainerService/managedClusters/deploy.bice
"parameters": {
// Required parameters
"name": {
"value": "<<namePrefix>>csmazure001"
"value": "<<namePrefix>>csmaz001"
},
"primaryAgentPoolProfile": {
"value": [
Expand Down