Skip to content

Commit

Permalink
use existing clusters-service MI for CS PR checking (Azure#637)
Browse files Browse the repository at this point in the history
this way we can reuse the role assignments that have been granted to the original CS MI

Signed-off-by: Gerd Oberlechner <[email protected]>
  • Loading branch information
geoberle authored Sep 23, 2024
1 parent 3addc56 commit 5efe3df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dev-infrastructure/configurations/cs-integ-msi.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ using '../templates/cs-integration-msi.bicep'

param namespaceFormatString = 'sandbox-jenkins-{0}-aro-hcp'

param clusterServiceManagedIdentityName = 'cs-integ-cluster-service'
param clusterServiceManagedIdentityName = 'clusters-service'

param clusterName = take('cs-integ-svc-cluster-${uniqueString('svc-cluster')}', 63)
8 changes: 2 additions & 6 deletions dev-infrastructure/templates/cs-integration-msi.bicep
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
@description('The location for the resources')
param location string = resourceGroup().location

@description('The format string for the namespace')
param namespaceFormatString string

Expand All @@ -10,8 +7,7 @@ param clusterServiceManagedIdentityName string
@description('The name of the cluster to integrate with')
param clusterName string

resource uami 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
location: location
resource uami 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = {
name: clusterServiceManagedIdentityName
}

Expand All @@ -21,7 +17,7 @@ resource aksCluster 'Microsoft.ContainerService/managedClusters@2024-04-02-previ

@batchSize(1)
resource uami_fedcred 'Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials@2023-01-31' = [
for i in range(0, 20): {
for i in range(0, 19): {
parent: uami
name: 'fedcred-${i}'
properties: {
Expand Down

0 comments on commit 5efe3df

Please sign in to comment.