Skip to content

Commit

Permalink
Align insights deployment names (#725)
Browse files Browse the repository at this point in the history
Co-authored-by: Erika Gressi <erikag.microsoft.com>
  • Loading branch information
eriqua authored Dec 6, 2021
1 parent 47ff593 commit 2a6a870
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion arm/Microsoft.Insights/actionGroups/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ resource actionGroup 'microsoft.insights/actionGroups@2019-06-01' = {
}

module actionGroup_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-ActionGroup-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Insights/activityLogAlerts/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ resource activityLogAlert 'Microsoft.Insights/activityLogAlerts@2020-10-01' = {
}

module activityLogAlert_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-ActivityLogAlert-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Insights/components/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ resource appInsights 'Microsoft.Insights/components@2020-02-02' = {
}

module appInsights_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-AppInsights-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Insights/metricAlerts/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
}

module metricAlert_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-MetricAlert-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
6 changes: 3 additions & 3 deletions arm/Microsoft.Insights/privateLinkScopes/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ resource privateLinkScope 'Microsoft.Insights/privateLinkScopes@2019-10-17-previ
}

module privateLinkScope_scopedResource 'scopedResources/deploy.bicep' = [for (scopedResource, index) in scopedResources: {
name: '${uniqueString(deployment().name, location)}-Insights-ScpdRes-${index}'
name: '${uniqueString(deployment().name, location)}-PvtLinkScope-ScopedRes-${index}'
params: {
name: scopedResource.name
privateLinkScopeName: privateLinkScope.name
Expand All @@ -59,7 +59,7 @@ resource privateLinkScope_lock 'Microsoft.Authorization/locks@2016-09-01' = if (
}

module privateLinkScope_privateEndpoints '.bicep/nested_privateEndpoint.bicep' = [for (endpoint, index) in privateEndpoints: {
name: '${uniqueString(deployment().name, location)}-Insights-PvtEndPnt-${index}'
name: '${uniqueString(deployment().name, location)}-PvtLinkScope-PrivateEndpoint-${index}'
params: {
privateEndpointResourceId: privateLinkScope.id
privateEndpointVnetLocation: reference(split(endpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
Expand All @@ -69,7 +69,7 @@ module privateLinkScope_privateEndpoints '.bicep/nested_privateEndpoint.bicep' =
}]

module privateLinkScope_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-PvtLinkScope-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Insights/scheduledQueryRules/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ resource queryRule 'Microsoft.Insights/scheduledQueryRules@2021-02-01-preview' =
}

module queryRule_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-QueryRule-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down

0 comments on commit 2a6a870

Please # to comment.