Skip to content

Commit

Permalink
Align compute deployment names (#736)
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 ac6b9e4 commit dd2eb7b
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion arm/Microsoft.Compute/availabilitySets/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ resource availabilitySet_lock 'Microsoft.Authorization/locks@2016-09-01' = if (l
}

module availabilitySet_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-AvSet-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Compute/diskEncryptionSets/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ resource diskEncryptionSet 'Microsoft.Compute/diskEncryptionSets@2020-12-01' = {
}

module diskEncryptionSet_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-DiskEncrSet-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
4 changes: 2 additions & 2 deletions arm/Microsoft.Compute/galleries/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ resource gallery_lock 'Microsoft.Authorization/locks@2016-09-01' = if (lock != '
}

module gallery_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${uniqueString(deployment().name, location)}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-Gallery-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand All @@ -63,7 +63,7 @@ module gallery_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in

// Images
module galleries_images 'images/deploy.bicep' = [for (image, index) in images: {
name: '${uniqueString(deployment().name, location)}-Image-${index}'
name: '${uniqueString(deployment().name, location)}-Gallery-Image-${index}'
params: {
name: image.name
galleryName: gallery.name
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Compute/galleries/images/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ resource image 'Microsoft.Compute/galleries/images@2020-09-30' = {
}

module galleryImage_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${deployment().name}-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
2 changes: 1 addition & 1 deletion arm/Microsoft.Compute/images/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ resource image 'Microsoft.Compute/images@2021-04-01' = {
}

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

module proximityPlacementGroup_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-ProxPlaceGroup-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
18 changes: 9 additions & 9 deletions arm/Microsoft.Compute/virtualMachineScaleSets/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ resource vmss 'Microsoft.Compute/virtualMachineScaleSets@2021-04-01' = {
}

module vmss_domainJoinExtension 'extensions/deploy.bicep' = if (extensionDomainJoinConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vmss-DomainJoin'
name: '${uniqueString(deployment().name, location)}-VMSS-DomainJoin'
params: {
virtualMachineScaleSetName: vmss.name
name: 'DomainJoin'
Expand All @@ -464,7 +464,7 @@ module vmss_domainJoinExtension 'extensions/deploy.bicep' = if (extensionDomainJ
}

module vmss_microsoftAntiMalwareExtension 'extensions/deploy.bicep' = if (extensionAntiMalwareConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vmss-MicrosoftAntiMalware'
name: '${uniqueString(deployment().name, location)}-VMSS-MicrosoftAntiMalware'
params: {
virtualMachineScaleSetName: vmss.name
name: 'MicrosoftAntiMalware'
Expand All @@ -483,7 +483,7 @@ resource vmss_logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@20
}

module vmss_microsoftMonitoringAgentExtension 'extensions/deploy.bicep' = if (extensionMonitoringAgentConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vmss-MicrosoftMonitoringAgent'
name: '${uniqueString(deployment().name, location)}-VMSS-MicrosoftMonitoringAgent'
params: {
virtualMachineScaleSetName: vmss.name
name: 'MicrosoftMonitoringAgent'
Expand All @@ -502,7 +502,7 @@ module vmss_microsoftMonitoringAgentExtension 'extensions/deploy.bicep' = if (ex
}

module vmss_dependencyAgentExtension 'extensions/deploy.bicep' = if (extensionDependencyAgentConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vmss-DependencyAgent'
name: '${uniqueString(deployment().name, location)}-VMSS-DependencyAgent'
params: {
virtualMachineScaleSetName: vmss.name
name: 'DependencyAgent'
Expand All @@ -515,7 +515,7 @@ module vmss_dependencyAgentExtension 'extensions/deploy.bicep' = if (extensionDe
}

module vmss_networkWatcherAgentExtension 'extensions/deploy.bicep' = if (extensionNetworkWatcherAgentConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vmss-NetworkWatcherAgent'
name: '${uniqueString(deployment().name, location)}-VMSS-NetworkWatcherAgent'
params: {
virtualMachineScaleSetName: vmss.name
name: 'NetworkWatcherAgent'
Expand All @@ -528,7 +528,7 @@ module vmss_networkWatcherAgentExtension 'extensions/deploy.bicep' = if (extensi
}

module vmss_desiredStateConfigurationExtension 'extensions/deploy.bicep' = if (extensionDSCConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vmss-DesiredStateConfiguration'
name: '${uniqueString(deployment().name, location)}-VMSS-DesiredStateConfiguration'
params: {
virtualMachineScaleSetName: vmss.name
name: 'DesiredStateConfiguration'
Expand All @@ -543,7 +543,7 @@ module vmss_desiredStateConfigurationExtension 'extensions/deploy.bicep' = if (e
}

module vmss_customScriptExtension 'extensions/deploy.bicep' = if (extensionCustomScriptConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vmss-CustomScriptExtension'
name: '${uniqueString(deployment().name, location)}-VMSS-CustomScriptExtension'
params: {
virtualMachineScaleSetName: vmss.name
name: 'CustomScriptExtension'
Expand All @@ -563,7 +563,7 @@ module vmss_customScriptExtension 'extensions/deploy.bicep' = if (extensionCusto
}

module vmss_diskEncryptionExtension 'extensions/deploy.bicep' = if (extensionDiskEncryptionConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vmss-DiskEncryption'
name: '${uniqueString(deployment().name, location)}-VMSS-DiskEncryption'
params: {
virtualMachineScaleSetName: vmss.name
name: 'DiskEncryption'
Expand Down Expand Up @@ -603,7 +603,7 @@ resource vmss_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-
}

module vmss_rbac '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${uniqueString(deployment().name, location)}-VMSS-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var networkSecurityGroup = {
}

module networkInterface_publicIPConfigurations 'nested_networkInterface_publicIPAddress.bicep' = [for (ipConfiguration, index) in ipConfigurationArray: if (contains(ipConfiguration, 'pipconfiguration')) {
name: '${deployment().name}-pip-${index}'
name: '${deployment().name}-PIP-${index}'
params: {
publicIPAddressName: '${virtualMachineName}${ipConfiguration.pipconfiguration.publicIpNameSuffix}'
publicIPPrefixId: (contains(ipConfiguration.pipconfiguration, 'publicIPPrefixId') ? (!(empty(ipConfiguration.pipconfiguration.publicIPPrefixId)) ? ipConfiguration.pipconfiguration.publicIPPrefixId : '') : '')
Expand Down Expand Up @@ -107,7 +107,7 @@ resource networkInterface_diagnosticSettings 'Microsoft.Insights/diagnosticsetti
}

module networkInterface_rbac 'nested_networkInterface_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${deployment().name}-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ resource publicIpAddress_diagnosticSettings 'Microsoft.Insights/diagnosticsettin
}

module publicIpAddress_rbac 'nested_networkInterface_publicIPAddress_rbac.bicep' = [for (roleAssignment, index) in roleAssignments: {
name: '${deployment().name}-rbac-${index}'
name: '${deployment().name}-Rbac-${index}'
params: {
principalIds: roleAssignment.principalIds
roleDefinitionIdOrName: roleAssignment.roleDefinitionIdOrName
Expand Down
22 changes: 11 additions & 11 deletions arm/Microsoft.Compute/virtualMachines/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ module pid_cuaId '.bicep/nested_cuaId.bicep' = if (!empty(cuaId)) {
}

module virtualMachine_nic '.bicep/nested_networkInterface.bicep' = [for (nicConfiguration, index) in nicConfigurations: {
name: '${uniqueString(deployment().name, location)}-vm-nic-${index}'
name: '${uniqueString(deployment().name, location)}-VM-Nic-${index}'
params: {
networkInterfaceName: '${name}${nicConfiguration.nicSuffix}'
virtualMachineName: name
Expand Down Expand Up @@ -403,7 +403,7 @@ resource virtualMachine 'Microsoft.Compute/virtualMachines@2021-07-01' = {
}

module vm_domainJoinExtension 'extensions/deploy.bicep' = if (extensionDomainJoinConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vm-DomainJoin'
name: '${uniqueString(deployment().name, location)}-VM-DomainJoin'
params: {
virtualMachineName: virtualMachine.name
name: 'DomainJoin'
Expand All @@ -420,7 +420,7 @@ module vm_domainJoinExtension 'extensions/deploy.bicep' = if (extensionDomainJoi
}

module vm_microsoftAntiMalwareExtension 'extensions/deploy.bicep' = if (extensionAntiMalwareConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vm-MicrosoftAntiMalware'
name: '${uniqueString(deployment().name, location)}-VM-MicrosoftAntiMalware'
params: {
virtualMachineName: virtualMachine.name
name: 'MicrosoftAntiMalware'
Expand All @@ -439,7 +439,7 @@ resource vm_logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021
}

module vm_microsoftMonitoringAgentExtension 'extensions/deploy.bicep' = if (extensionMonitoringAgentConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vm-MicrosoftMonitoringAgent'
name: '${uniqueString(deployment().name, location)}-VM-MicrosoftMonitoringAgent'
params: {
virtualMachineName: virtualMachine.name
name: 'MicrosoftMonitoringAgent'
Expand All @@ -458,7 +458,7 @@ module vm_microsoftMonitoringAgentExtension 'extensions/deploy.bicep' = if (exte
}

module vm_dependencyAgentExtension 'extensions/deploy.bicep' = if (extensionDependencyAgentConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vm-DependencyAgent'
name: '${uniqueString(deployment().name, location)}-VM-DependencyAgent'
params: {
virtualMachineName: virtualMachine.name
name: 'DependencyAgent'
Expand All @@ -471,7 +471,7 @@ module vm_dependencyAgentExtension 'extensions/deploy.bicep' = if (extensionDepe
}

module vm_networkWatcherAgentExtension 'extensions/deploy.bicep' = if (extensionNetworkWatcherAgentConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vm-NetworkWatcherAgent'
name: '${uniqueString(deployment().name, location)}-VM-NetworkWatcherAgent'
params: {
virtualMachineName: virtualMachine.name
name: 'NetworkWatcherAgent'
Expand All @@ -484,7 +484,7 @@ module vm_networkWatcherAgentExtension 'extensions/deploy.bicep' = if (extension
}

module vm_desiredStateConfigurationExtension 'extensions/deploy.bicep' = if (extensionDSCConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vm-DesiredStateConfiguration'
name: '${uniqueString(deployment().name, location)}-VM-DesiredStateConfiguration'
params: {
virtualMachineName: virtualMachine.name
name: 'DesiredStateConfiguration'
Expand All @@ -499,7 +499,7 @@ module vm_desiredStateConfigurationExtension 'extensions/deploy.bicep' = if (ext
}

module vm_customScriptExtension 'extensions/deploy.bicep' = if (extensionCustomScriptConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vm-CustomScriptExtension'
name: '${uniqueString(deployment().name, location)}-VM-CustomScriptExtension'
params: {
virtualMachineName: virtualMachine.name
name: 'CustomScriptExtension'
Expand All @@ -519,7 +519,7 @@ module vm_customScriptExtension 'extensions/deploy.bicep' = if (extensionCustomS
}

module vm_diskEncryptionExtension 'extensions/deploy.bicep' = if (extensionDiskEncryptionConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-vm-DiskEncryption'
name: '${uniqueString(deployment().name, location)}-VM-DiskEncryption'
params: {
virtualMachineName: virtualMachine.name
name: 'DiskEncryption'
Expand All @@ -538,7 +538,7 @@ module vm_diskEncryptionExtension 'extensions/deploy.bicep' = if (extensionDiskE
}

module virtualMachine_backup '.bicep/nested_backup.bicep' = if (!empty(backupVaultName)) {
name: '${uniqueString(deployment().name, location)}-vm-backup'
name: '${uniqueString(deployment().name, location)}-VM-Backup'
params: {
backupResourceName: '${backupVaultName}/Azure/iaasvmcontainer;iaasvmcontainerv2;${resourceGroup().name};${virtualMachine.name}/vm;iaasvmcontainerv2;${resourceGroup().name};${virtualMachine.name}'
protectedItemType: 'Microsoft.Compute/virtualMachines'
Expand Down Expand Up @@ -568,7 +568,7 @@ resource virtualMachine_lock 'Microsoft.Authorization/locks@2017-04-01' = if (lo
}

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

0 comments on commit dd2eb7b

Please sign in to comment.