Skip to content

Commit

Permalink
feat: Add output 'kubeletidentityClientId' and 'kubeletidentityResour…
Browse files Browse the repository at this point in the history
…ceId' in AKS Module - `avm/res/container-service/managed-cluster` (Azure#1464)

Fixed issue Azure#1128.

Updated content: 

- Add output `kubeletidentityClientId` and `kubeletidentityResourceId`
in AKS Module.
- Update readme file in AKS Module.

@jongio for notification.

---------

Co-authored-by: zedy <[email protected]>
Co-authored-by: Alexander Sehr <[email protected]>
  • Loading branch information
3 people authored Apr 11, 2024
1 parent c4e8735 commit afeaf3e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
4 changes: 3 additions & 1 deletion avm/res/container-service/managed-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3233,7 +3233,9 @@ Specifies whether the webApplicationRoutingEnabled add-on is enabled or not.
| `ingressApplicationGatewayIdentityObjectId` | string | The Object ID of Application Gateway Ingress Controller (AGIC) identity. |
| `keyvaultIdentityClientId` | string | The Client ID of the Key Vault Secrets Provider identity. |
| `keyvaultIdentityObjectId` | string | The Object ID of the Key Vault Secrets Provider identity. |
| `kubeletidentityObjectId` | string | The Object ID of the AKS identity. |
| `kubeletIdentityClientId` | string | The Client ID of the AKS identity. |
| `kubeletIdentityObjectId` | string | The Object ID of the AKS identity. |
| `kubeletIdentityResourceId` | string | The Resource ID of the AKS identity. |
| `location` | string | The location the resource was deployed into. |
| `name` | string | The name of the managed cluster. |
| `oidcIssuerUrl` | string | The OIDC token issuer URL. |
Expand Down
8 changes: 7 additions & 1 deletion avm/res/container-service/managed-cluster/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -892,8 +892,14 @@ output controlPlaneFQDN string = enablePrivateCluster
@description('The principal ID of the system assigned identity.')
output systemAssignedMIPrincipalId string = managedCluster.?identity.?principalId ?? ''

@description('The Client ID of the AKS identity.')
output kubeletIdentityClientId string = managedCluster.properties.?identityProfile.?kubeletidentity.?clientId ?? ''

@description('The Object ID of the AKS identity.')
output kubeletidentityObjectId string = managedCluster.properties.?identityProfile.?kubeletidentity.?objectId ?? ''
output kubeletIdentityObjectId string = managedCluster.properties.?identityProfile.?kubeletidentity.?objectId ?? ''

@description('The Resource ID of the AKS identity.')
output kubeletIdentityResourceId string = managedCluster.properties.?identityProfile.?kubeletidentity.?resourceId ?? ''

@description('The Object ID of the OMS agent identity.')
output omsagentIdentityObjectId string = managedCluster.properties.?addonProfiles.?omsagent.?identity.?objectId ?? ''
Expand Down
16 changes: 15 additions & 1 deletion avm/res/container-service/managed-cluster/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -2736,13 +2736,27 @@
},
"value": "[coalesce(tryGet(tryGet(reference('managedCluster', '2023-07-02-preview', 'full'), 'identity'), 'principalId'), '')]"
},
"kubeletidentityObjectId": {
"kubeletIdentityClientId": {
"type": "string",
"metadata": {
"description": "The Client ID of the AKS identity."
},
"value": "[coalesce(tryGet(tryGet(tryGet(reference('managedCluster'), 'identityProfile'), 'kubeletidentity'), 'clientId'), '')]"
},
"kubeletIdentityObjectId": {
"type": "string",
"metadata": {
"description": "The Object ID of the AKS identity."
},
"value": "[coalesce(tryGet(tryGet(tryGet(reference('managedCluster'), 'identityProfile'), 'kubeletidentity'), 'objectId'), '')]"
},
"kubeletIdentityResourceId": {
"type": "string",
"metadata": {
"description": "The Resource ID of the AKS identity."
},
"value": "[coalesce(tryGet(tryGet(tryGet(reference('managedCluster'), 'identityProfile'), 'kubeletidentity'), 'resourceId'), '')]"
},
"omsagentIdentityObjectId": {
"type": "string",
"metadata": {
Expand Down

0 comments on commit afeaf3e

Please sign in to comment.