From dd2eb7b29a502e77947b864ec9bc996eb337c086 Mon Sep 17 00:00:00 2001 From: Erika Gressi <56914614+eriqua@users.noreply.github.com> Date: Mon, 6 Dec 2021 10:15:38 +0100 Subject: [PATCH] Align compute deployment names (#736) Co-authored-by: Erika Gressi --- .../availabilitySets/deploy.bicep | 2 +- .../diskEncryptionSets/deploy.bicep | 2 +- arm/Microsoft.Compute/galleries/deploy.bicep | 4 ++-- .../galleries/images/deploy.bicep | 2 +- arm/Microsoft.Compute/images/deploy.bicep | 2 +- .../proximityPlacementGroups/deploy.bicep | 2 +- .../virtualMachineScaleSets/deploy.bicep | 18 +++++++-------- .../.bicep/nested_networkInterface.bicep | 4 ++-- ...ted_networkInterface_publicIPAddress.bicep | 2 +- .../virtualMachines/deploy.bicep | 22 +++++++++---------- 10 files changed, 30 insertions(+), 30 deletions(-) diff --git a/arm/Microsoft.Compute/availabilitySets/deploy.bicep b/arm/Microsoft.Compute/availabilitySets/deploy.bicep index 7df4ffd083..687c53f292 100644 --- a/arm/Microsoft.Compute/availabilitySets/deploy.bicep +++ b/arm/Microsoft.Compute/availabilitySets/deploy.bicep @@ -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 diff --git a/arm/Microsoft.Compute/diskEncryptionSets/deploy.bicep b/arm/Microsoft.Compute/diskEncryptionSets/deploy.bicep index 106668ce83..332fd6cae3 100644 --- a/arm/Microsoft.Compute/diskEncryptionSets/deploy.bicep +++ b/arm/Microsoft.Compute/diskEncryptionSets/deploy.bicep @@ -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 diff --git a/arm/Microsoft.Compute/galleries/deploy.bicep b/arm/Microsoft.Compute/galleries/deploy.bicep index 38cc47dc08..fa4d9e153f 100644 --- a/arm/Microsoft.Compute/galleries/deploy.bicep +++ b/arm/Microsoft.Compute/galleries/deploy.bicep @@ -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 @@ -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 diff --git a/arm/Microsoft.Compute/galleries/images/deploy.bicep b/arm/Microsoft.Compute/galleries/images/deploy.bicep index 8f1d89d38f..1b8d10d798 100644 --- a/arm/Microsoft.Compute/galleries/images/deploy.bicep +++ b/arm/Microsoft.Compute/galleries/images/deploy.bicep @@ -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 diff --git a/arm/Microsoft.Compute/images/deploy.bicep b/arm/Microsoft.Compute/images/deploy.bicep index ab230818fe..eb3a19bf7e 100644 --- a/arm/Microsoft.Compute/images/deploy.bicep +++ b/arm/Microsoft.Compute/images/deploy.bicep @@ -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 diff --git a/arm/Microsoft.Compute/proximityPlacementGroups/deploy.bicep b/arm/Microsoft.Compute/proximityPlacementGroups/deploy.bicep index ee15ee087f..152fa60727 100644 --- a/arm/Microsoft.Compute/proximityPlacementGroups/deploy.bicep +++ b/arm/Microsoft.Compute/proximityPlacementGroups/deploy.bicep @@ -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 diff --git a/arm/Microsoft.Compute/virtualMachineScaleSets/deploy.bicep b/arm/Microsoft.Compute/virtualMachineScaleSets/deploy.bicep index 7f8af299b9..bef0dd1e46 100644 --- a/arm/Microsoft.Compute/virtualMachineScaleSets/deploy.bicep +++ b/arm/Microsoft.Compute/virtualMachineScaleSets/deploy.bicep @@ -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' @@ -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' @@ -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' @@ -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' @@ -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' @@ -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' @@ -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' @@ -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' @@ -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 diff --git a/arm/Microsoft.Compute/virtualMachines/.bicep/nested_networkInterface.bicep b/arm/Microsoft.Compute/virtualMachines/.bicep/nested_networkInterface.bicep index 69e81d6bb5..dc9e755dab 100644 --- a/arm/Microsoft.Compute/virtualMachines/.bicep/nested_networkInterface.bicep +++ b/arm/Microsoft.Compute/virtualMachines/.bicep/nested_networkInterface.bicep @@ -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 : '') : '') @@ -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 diff --git a/arm/Microsoft.Compute/virtualMachines/.bicep/nested_networkInterface_publicIPAddress.bicep b/arm/Microsoft.Compute/virtualMachines/.bicep/nested_networkInterface_publicIPAddress.bicep index ff4721a213..5f98e281b5 100644 --- a/arm/Microsoft.Compute/virtualMachines/.bicep/nested_networkInterface_publicIPAddress.bicep +++ b/arm/Microsoft.Compute/virtualMachines/.bicep/nested_networkInterface_publicIPAddress.bicep @@ -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 diff --git a/arm/Microsoft.Compute/virtualMachines/deploy.bicep b/arm/Microsoft.Compute/virtualMachines/deploy.bicep index 722b6463ef..8d6e028ddd 100644 --- a/arm/Microsoft.Compute/virtualMachines/deploy.bicep +++ b/arm/Microsoft.Compute/virtualMachines/deploy.bicep @@ -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 @@ -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' @@ -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' @@ -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' @@ -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' @@ -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' @@ -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' @@ -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' @@ -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' @@ -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' @@ -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