Skip to content

Commit

Permalink
Release 1.2.1 (#22)
Browse files Browse the repository at this point in the history
* Release 1.2.1

* Release 1.2.1

* Release 1.2.1

---------

Co-authored-by: Microsoft Open Source <microsoftopensource@users.noreply.github.com>
  • Loading branch information
VeronicaSea and microsoftopensource authored Sep 6, 2024
1 parent 8965051 commit 08fecf2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ resource resRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01'
name: guid(resUserMsi.id, principalId, parRoleDefinitionIdOrName)
properties: {
description: parDescription
roleDefinitionId: contains(varBuiltInRoleNames, parRoleDefinitionIdOrName) ? varBuiltInRoleNames[parRoleDefinitionIdOrName] : parRoleDefinitionIdOrName
roleDefinitionId: varBuiltInRoleNames[?parRoleDefinitionIdOrName] ?? parRoleDefinitionIdOrName
principalId: principalId
principalType: !empty(parPrincipalType) ? any(parPrincipalType) : null
condition: !empty(parCondition) ? parCondition : null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,6 @@ param parRoleAssignments array = []
@description('Optional. Tags of the resource.')
param parTags object = {}

@description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
param parEnableDefaultTelemetry bool = true

// Create default telemetry deployment
resource resDefaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (parEnableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, parLocation)}'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
}
}
}

// Create user assigned identity
resource resUserMsi 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
name: parName
Expand All @@ -61,12 +45,12 @@ resource resUserMsiLock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(
module modUserMsiRoleAssignments '.bicep/nested_roleAssignments.bicep' = [for (roleAssignment, index) in parRoleAssignments: {
name: '${uniqueString(deployment().name, parLocation)}-UserMSI-Rbac-${index}'
params: {
parDescription: contains(roleAssignment, 'description') ? roleAssignment.description : ''
parDescription: roleAssignment.?description ?? ''
parPrincipalIds: roleAssignment.principalIds
parPrincipalType: contains(roleAssignment, 'principalType') ? roleAssignment.principalType : ''
parPrincipalType: roleAssignment.?principalType ?? ''
parRoleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
parCondition: contains(roleAssignment, 'condition') ? roleAssignment.condition : ''
parDelegatedManagedIdentityResourceId: contains(roleAssignment, 'delegatedManagedIdentityResourceId') ? roleAssignment.delegatedManagedIdentityResourceId : ''
parCondition: roleAssignment.?condition ?? ''
parDelegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId ?? ''
parResourceId: resUserMsi.id
}
}]
Expand Down

0 comments on commit 08fecf2

Please sign in to comment.