Skip to content

Commit

Permalink
use cluster resource props instead of reference to get the identity
Browse files Browse the repository at this point in the history
  • Loading branch information
ferantivero committed Apr 27, 2022
1 parent 13df09a commit e1c9e67
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cluster-stamp.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ resource acrKubeletAcrPullRole_roleAssignment 'Microsoft.Authorization/roleAssig
properties: {
roleDefinitionId: acrPullRole
description: 'Allows AKS to pull container images from this ACR instance.'
principalId: reference(mc.id, '2020-12-01').identityProfile.kubeletidentity.objectId
principalId: mc.properties.identityProfile.kubeletidentity.objectId
principalType: 'ServicePrincipal'
}
dependsOn: []
Expand All @@ -1431,7 +1431,7 @@ resource mcOmsAgentMonitoringMetricsPublisherRole_roleAssignment 'Microsoft.Auth
name: guid(mc.id, 'omsagent', monitoringMetricsPublisherRole)
properties: {
roleDefinitionId: monitoringMetricsPublisherRole
principalId: reference(mc.id, '2020-12-01').addonProfiles.omsagent.identity.objectId
principalId: mc.properties.addonProfiles.omsagent.identity.objectId
principalType: 'ServicePrincipal'
}
dependsOn: []
Expand All @@ -1443,7 +1443,7 @@ resource miKubeletManagedIdentityOperatorRole_roleAssignment 'Microsoft.Authoriz
name: guid(resourceGroup().id, 'podmi-ingress-controller', managedIdentityOperatorRole)
properties: {
roleDefinitionId: managedIdentityOperatorRole
principalId: reference(mc.id, '2020-12-01').identityProfile.kubeletidentity.objectId
principalId: mc.properties.identityProfile.kubeletidentity.objectId
principalType: 'ServicePrincipal'
}
dependsOn: []
Expand Down Expand Up @@ -1597,7 +1597,7 @@ module ndEnsureClusterUserAssignedHasRbacToManageVMSS 'nested_EnsureClusterUserA
name: 'EnsureClusterUserAssignedHasRbacToManageVMSS'
scope: resourceGroup(nodeResourceGroupName)
params: {
kubeletidentityObjectId: reference(mc.id, '2020-03-01').identityProfile.kubeletidentity.objectId
kubeletidentityObjectId: mc.properties.identityProfile.kubeletidentity.objectId
}
dependsOn: []
}
Expand Down

0 comments on commit e1c9e67

Please sign in to comment.