diff --git a/avm/res/container-service/managed-cluster/README.md b/avm/res/container-service/managed-cluster/README.md index 10bcd4bb73..d42773ac42 100644 --- a/avm/res/container-service/managed-cluster/README.md +++ b/avm/res/container-service/managed-cluster/README.md @@ -2785,6 +2785,7 @@ param tags = { | [`nodeResourceGroup`](#parameter-noderesourcegroup) | string | Name of the resource group containing agent pool nodes. | | [`nodeResourceGroupProfile`](#parameter-noderesourcegroupprofile) | object | The node resource group configuration profile. | | [`omsAgentEnabled`](#parameter-omsagentenabled) | bool | Specifies whether the OMS agent is enabled. | +| [`omsAgentUseAADAuth`](#parameter-omsagentuseaadauth) | bool | Specifies whether the OMS agent is using managed identity authentication. | | [`openServiceMeshEnabled`](#parameter-openservicemeshenabled) | bool | Specifies whether the openServiceMesh add-on is enabled or not. | | [`outboundType`](#parameter-outboundtype) | string | Specifies outbound (egress) routing method. | | [`podCidr`](#parameter-podcidr) | string | Specifies the CIDR notation IP range from which to assign pod IPs when kubenet is used. | @@ -4757,6 +4758,15 @@ Specifies whether the OMS agent is enabled. - Default: `True` - MinValue: 24 +### Parameter: `omsAgentUseAADAuth` + +Specifies whether the OMS agent is using managed identity authentication. + +- Required: No +- Type: bool +- Default: `False` +- MinValue: 24 + ### Parameter: `openServiceMeshEnabled` Specifies whether the openServiceMesh add-on is enabled or not. diff --git a/avm/res/container-service/managed-cluster/agent-pool/main.json b/avm/res/container-service/managed-cluster/agent-pool/main.json index f060d4cfee..997d0b4670 100644 --- a/avm/res/container-service/managed-cluster/agent-pool/main.json +++ b/avm/res/container-service/managed-cluster/agent-pool/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.33.13.18514", - "templateHash": "3772142304849625200" + "version": "0.33.93.31351", + "templateHash": "3323013309772683046" }, "name": "Azure Kubernetes Service (AKS) Managed Cluster Agent Pools", "description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster Agent Pool." diff --git a/avm/res/container-service/managed-cluster/main.bicep b/avm/res/container-service/managed-cluster/main.bicep index b1fb466143..b781128a02 100644 --- a/avm/res/container-service/managed-cluster/main.bicep +++ b/avm/res/container-service/managed-cluster/main.bicep @@ -344,6 +344,9 @@ param diagnosticSettings diagnosticSettingFullType[]? @description('Optional. Specifies whether the OMS agent is enabled.') param omsAgentEnabled bool = true +@description('Optional. Specifies whether the OMS agent is using managed identity authentication.') +param omsAgentUseAADAuth bool = false + @description('Optional. Resource ID of the monitoring log analytics workspace.') param monitoringWorkspaceResourceId string? @@ -657,6 +660,11 @@ resource managedCluster 'Microsoft.ContainerService/managedClusters@2024-09-02-p config: omsAgentEnabled && !empty(monitoringWorkspaceResourceId) ? { logAnalyticsWorkspaceResourceID: monitoringWorkspaceResourceId! + ...(omsAgentUseAADAuth + ? { + useAADAuth: 'true' + } + : {}) } : null } diff --git a/avm/res/container-service/managed-cluster/main.json b/avm/res/container-service/managed-cluster/main.json index cb74fda14c..5d5b313589 100644 --- a/avm/res/container-service/managed-cluster/main.json +++ b/avm/res/container-service/managed-cluster/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.33.13.18514", - "templateHash": "12618640856903207312" + "version": "0.33.93.31351", + "templateHash": "5916819919470014658" }, "name": "Azure Kubernetes Service (AKS) Managed Clusters", "description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster." @@ -1478,6 +1478,13 @@ "description": "Optional. Specifies whether the OMS agent is enabled." } }, + "omsAgentUseAADAuth": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Optional. Specifies whether the OMS agent is using managed identity authentication." + } + }, "monitoringWorkspaceResourceId": { "type": "string", "nullable": true, @@ -1738,7 +1745,7 @@ }, "omsagent": { "enabled": "[and(parameters('omsAgentEnabled'), not(empty(parameters('monitoringWorkspaceResourceId'))))]", - "config": "[if(and(parameters('omsAgentEnabled'), not(empty(parameters('monitoringWorkspaceResourceId')))), createObject('logAnalyticsWorkspaceResourceID', parameters('monitoringWorkspaceResourceId')), null())]" + "config": "[if(and(parameters('omsAgentEnabled'), not(empty(parameters('monitoringWorkspaceResourceId')))), shallowMerge(createArray(createObject('logAnalyticsWorkspaceResourceID', parameters('monitoringWorkspaceResourceId')), if(parameters('omsAgentUseAADAuth'), createObject('useAADAuth', 'true'), createObject()))), null())]" }, "aciConnectorLinux": { "enabled": "[parameters('aciConnectorLinuxEnabled')]" @@ -1984,8 +1991,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.33.13.18514", - "templateHash": "8370238557121472803" + "version": "0.33.93.31351", + "templateHash": "17573192747850353863" }, "name": "Azure Kubernetes Service (AKS) Managed Cluster Maintenance Configurations", "description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster Maintenance Configurations." @@ -2180,8 +2187,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.33.13.18514", - "templateHash": "3772142304849625200" + "version": "0.33.93.31351", + "templateHash": "3323013309772683046" }, "name": "Azure Kubernetes Service (AKS) Managed Cluster Agent Pools", "description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster Agent Pool." diff --git a/avm/res/container-service/managed-cluster/maintenance-configurations/main.json b/avm/res/container-service/managed-cluster/maintenance-configurations/main.json index 370698ec8b..4a41bfaa00 100644 --- a/avm/res/container-service/managed-cluster/maintenance-configurations/main.json +++ b/avm/res/container-service/managed-cluster/maintenance-configurations/main.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.33.13.18514", - "templateHash": "8370238557121472803" + "version": "0.33.93.31351", + "templateHash": "17573192747850353863" }, "name": "Azure Kubernetes Service (AKS) Managed Cluster Maintenance Configurations", "description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster Maintenance Configurations."