Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arm/Microsoft.Network/applicationGateways/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ resource applicationGateway_diagnosticSettingName 'Microsoft.Insights/diagnostic
}

module applicationGateway_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-AppGateway-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ resource applicationSecurityGroup_lock 'Microsoft.Authorization/locks@2016-09-01
}

module applicationSecurityGroup_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-AppSecurityGroup-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Network/azureFirewalls/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ resource azureFirewall_diagnosticSettings 'Microsoft.Insights/diagnosticSettings
}

module azureFirewall_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-AzFW-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
4 changes: 2 additions & 2 deletions arm/Microsoft.Network/bastionHosts/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ resource publicIPAddressExisting 'Microsoft.Network/publicIPAddresses@2021-02-01
}

module publicIPAddress '.bicep/nested_publicIPAddress.bicep' = if (empty(publicIPAddressId)) {
name: '${uniqueString(deployment().name, location)}-bastion-pip'
name: '${uniqueString(deployment().name, location)}-Bastion-PIP'
params: {
name: contains(publicIPAddressObject, 'name') ? (!(empty(publicIPAddressObject.name)) ? publicIPAddressObject.name : '${name}-pip') : '${name}-pip'
publicIPPrefixResourceId: contains(publicIPAddressObject, 'publicIPPrefixResourceId') ? (!(empty(publicIPAddressObject.publicIPPrefixResourceId)) ? publicIPAddressObject.publicIPPrefixResourceId : '') : ''
Expand Down Expand Up @@ -151,7 +151,7 @@ resource azureBastion_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@
}

module azureBastion_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${uniqueString(deployment().name, location)}-bastion-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-Bastion-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Network/ddosProtectionPlans/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ resource ddosProtectionPlan_lock 'Microsoft.Authorization/locks@2016-09-01' = if
}

module ddosProtectionPlan_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-DDoSProtectionPlan-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Network/expressRouteCircuits/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ resource expressRouteCircuits_diagnosticSettings 'Microsoft.Insights/diagnosticS
}

module expressRouteCircuits_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-ExpRouteCircuits-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Network/ipGroups/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ resource ipGroup_lock 'Microsoft.Authorization/locks@2016-09-01' = if (lock != '
}

module ipGroup_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-IPGroup-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Network/loadBalancers/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ resource loadBalancer_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@
}

module loadBalancer_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-LoadBalancer-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Network/localNetworkGateways/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ resource localNetworkGateway_lock 'Microsoft.Authorization/locks@2016-09-01' = i
}

module localNetworkGateway_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-LocalNetworkGateway-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Network/natGateways/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ resource natGateway_lock 'Microsoft.Authorization/locks@2016-09-01' = if (lock !
}

module natGateway_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-NatGateway-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Network/networkSecurityGroups/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ resource networkSecurityGroup_diagnosticSettings 'Microsoft.Insights/diagnosticS
}

module networkSecurityGroup_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-NSG-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
8 changes: 4 additions & 4 deletions arm/Microsoft.Network/networkWatchers/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ resource networkWatcher_lock 'Microsoft.Authorization/locks@2016-09-01' = if (lo
}

module networkWatcher_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-NW-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
resourceId: networkWatcher.id
}
}]

module networkWatcher_connectionMonitors 'connectionMonitors/deploy.bicep' = [for connectionMonitor in connectionMonitors: {
name: connectionMonitor.name
module networkWatcher_connectionMonitors 'connectionMonitors/deploy.bicep' = [for (connectionMonitor, index) in connectionMonitors: {
name: '${uniqueString(deployment().name, location)}-NW-ConnectionMonitor-${index}'
params: {
endpoints: contains(connectionMonitor, 'endpoints') ? connectionMonitor.endpoints : []
name: connectionMonitor.name
Expand All @@ -71,7 +71,7 @@ module networkWatcher_connectionMonitors 'connectionMonitors/deploy.bicep' = [fo
}]

module networkWatcher_flowLogs 'flowLogs/deploy.bicep' = [for (flowLog, index) in flowLogs: {
name: '${deployment().name}-flowLog-${index}'
name: '${uniqueString(deployment().name, location)}-NW-FlowLog-${index}'
params: {
enabled: contains(flowLog, 'enabled') ? flowLog.enabled : true
formatVersion: contains(flowLog, 'formatVersion') ? flowLog.formatVersion : 2
Expand Down
4 changes: 2 additions & 2 deletions arm/Microsoft.Network/privateDnsZones/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ resource privateDnsZone 'Microsoft.Network/privateDnsZones@2018-09-01' = {
}

module privateDnsZone_virtualNetworkLinks 'virtualNetworkLinks/deploy.bicep' = [for (virtualNetworkLinks, index) in virtualNetworkLinks: {
name: '${deployment().name}-virtualNetworkLink-${index}'
name: '${uniqueString(deployment().name, location)}-PrivateDnsZone-VirtualNetworkLink-${index}'
params: {
privateDnsZoneName: privateDnsZone.name
name: contains(virtualNetworkLinks, 'name') ? virtualNetworkLinks.name : last(split(virtualNetworkLinks.virtualNetworkResourceId, '/'))
Expand All @@ -57,7 +57,7 @@ resource privateDnsZone_lock 'Microsoft.Authorization/locks@2016-09-01' = if (lo
}

module privateDnsZone_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-PrivateDnsZone-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
4 changes: 2 additions & 2 deletions arm/Microsoft.Network/privateEndpoints/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ resource privateEndpoint 'Microsoft.Network/privateEndpoints@2021-03-01' = {
}

module privateEndpoint_privateDnsZoneGroups 'privateDnsZoneGroups/deploy.bicep' = [for (privateDnsZoneGroup, index) in privateDnsZoneGroups: {
name: '${deployment().name}-privateDnsZoneGroup-${index}'
name: '${uniqueString(deployment().name, location)}-PrivateEndpoint-PrivateDnsZoneGroup-${index}'
params: {
privateDNSResourceIds: privateDnsZoneGroup.privateDNSResourceIds
privateEndpointName: privateEndpoint.name
Expand All @@ -78,7 +78,7 @@ resource privateEndpoint_lock 'Microsoft.Authorization/locks@2016-09-01' = if (l
}

module privateEndpoint_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-PrivateEndpoint-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Network/publicIPAddresses/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ resource publicIpAddress_diagnosticSettings 'Microsoft.Insights/diagnosticSettin
}

module publicIpAddress_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-PIPAddress-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Network/publicIPPrefixes/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ resource publicIpPrefix_lock 'Microsoft.Authorization/locks@2016-09-01' = if (lo
}

module publicIpPrefix_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-PIPPrefix-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Network/routeTables/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ resource routeTable_lock 'Microsoft.Authorization/locks@2016-09-01' = if (lock !
}

module routeTable_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-RouteTable-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
24 changes: 12 additions & 12 deletions arm/Microsoft.Network/trafficmanagerprofiles/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ module pid_cuaId '.bicep/nested_cuaId.bicep' = if (!empty(cuaId)) {
params: {}
}

resource trafficmanagerprofile 'Microsoft.Network/trafficmanagerprofiles@2018-08-01' = {
resource trafficManagerProfile 'Microsoft.Network/trafficmanagerprofiles@2018-08-01' = {
name: name
tags: tags
location: 'global'
Expand All @@ -138,17 +138,17 @@ resource trafficmanagerprofile 'Microsoft.Network/trafficmanagerprofiles@2018-08
}
}

resource trafficmanagerprofile_lock 'Microsoft.Authorization/locks@2016-09-01' = if (lock != 'NotSpecified') {
name: '${trafficmanagerprofile.name}-${lock}-lock'
resource trafficManagerProfile_lock 'Microsoft.Authorization/locks@2016-09-01' = if (lock != 'NotSpecified') {
name: '${trafficManagerProfile.name}-${lock}-lock'
properties: {
level: lock
notes: lock == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot modify the resource or child resources.'
}
scope: trafficmanagerprofile
scope: trafficManagerProfile
}

resource trafficmanagerprofile_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2017-05-01-preview' = if (!empty(diagnosticStorageAccountId) || !empty(workspaceId) || !empty(eventHubAuthorizationRuleId) || !empty(eventHubName)) {
name: '${trafficmanagerprofile.name}-diagnosticSettings'
resource trafficManagerProfile_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2017-05-01-preview' = if (!empty(diagnosticStorageAccountId) || !empty(workspaceId) || !empty(eventHubAuthorizationRuleId) || !empty(eventHubName)) {
name: '${trafficManagerProfile.name}-diagnosticSettings'
properties: {
storageAccountId: empty(diagnosticStorageAccountId) ? null : diagnosticStorageAccountId
workspaceId: empty(workspaceId) ? null : workspaceId
Expand All @@ -157,23 +157,23 @@ resource trafficmanagerprofile_diagnosticSettings 'Microsoft.Insights/diagnostic
metrics: empty(diagnosticStorageAccountId) && empty(workspaceId) && empty(eventHubAuthorizationRuleId) && empty(eventHubName) ? null : diagnosticsMetrics
logs: empty(diagnosticStorageAccountId) && empty(workspaceId) && empty(eventHubAuthorizationRuleId) && empty(eventHubName) ? null : diagnosticsLogs
}
scope: trafficmanagerprofile
scope: trafficManagerProfile
}

module trafficmanagerprofile_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
module trafficManagerProfile_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${uniqueString(deployment().name)}-TrafficManagerProfile-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
resourceId: trafficmanagerprofile.id
resourceId: trafficManagerProfile.id
}
}]

@description('The resource ID of the traffix manager')
output trafficManagerResourceId string = trafficmanagerprofile.id
output trafficManagerResourceId string = trafficManagerProfile.id

@description('The resource group the traffix manager was deployed into')
output trafficManagerResourceGroup string = resourceGroup().name

@description('The name of the traffix manager was deployed into')
output trafficManagerName string = trafficmanagerprofile.name
output trafficManagerName string = trafficManagerProfile.name
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ resource virtualNetworkGateway_diagnosticSettings 'Microsoft.Insights/diagnostic
}

module virtualNetworkGateway_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-VNetGateway-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
4 changes: 2 additions & 2 deletions arm/Microsoft.Network/virtualNetworks/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2021-05-01' = {
}

module virtualNetworkPeerings_resource 'virtualNetworkPeerings/deploy.bicep' = [for (virtualNetworkPeering, index) in virtualNetworkPeerings: {
name: '${uniqueString(deployment().name, location)}-virtualNetworkPeering-${index}'
name: '${uniqueString(deployment().name, location)}-VNet-VNetPeering-${index}'
params: {
localVnetName: name
remoteVirtualNetworkId: virtualNetworkPeering.remoteVirtualNetworkId
Expand Down Expand Up @@ -165,7 +165,7 @@ resource appServiceEnvironment_diagnosticSettings 'Microsoft.Insights/diagnostic
}

module virtualNetwork_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${uniqueString(deployment().name, location)}-Vnet-Rbac-${index}'
name: '${uniqueString(deployment().name, location)}-VNet-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Network/virtualWans/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ resource vpnGateway_lock 'Microsoft.Authorization/locks@2016-09-01' = if (lock !
}

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