diff --git a/modules/Microsoft.Compute/virtualMachines/.test/linux/dependencies.bicep b/modules/Microsoft.Compute/virtualMachines/.test/linux/dependencies.bicep index f398b4e810..0f5901e0eb 100644 --- a/modules/Microsoft.Compute/virtualMachines/.test/linux/dependencies.bicep +++ b/modules/Microsoft.Compute/virtualMachines/.test/linux/dependencies.bicep @@ -308,8 +308,11 @@ output managedIdentityResourceId string = managedIdentity.id @description('The resource ID of the created Load Balancer Backend Pool.') output loadBalancerBackendPoolResourceId string = loadBalancer.properties.backendAddressPools[0].id -@description('The resource ID of the created Recovery Services Vault.') -output recoveryServicesVaultResourceId string = recoveryServicesVault.id +@description('The name of the created Recovery Services Vault.') +output recoveryServicesVaultName string = recoveryServicesVault.name + +@description('The name of the Resource Group, the Recovery Services Vault was created in.') +output recoveryServicesVaultResourceGroupName string = resourceGroup().name @description('The name of the Backup Policy created in the Backup Recovery Vault.') output recoveryServicesVaultBackupPolicyName string = backupPolicyName @@ -329,6 +332,9 @@ output storageAccountResourceId string = storageAccount.id @description('The URL of the Custom Script Extension in the created Storage Account') output storageAccountCSEFileUrl string = '${storageAccount.properties.primaryEndpoints.blob}${storageContainerName}/${storageAccountCSEFileName}' +@description('The name of the Custom Script Extension in the created Storage Account') +output storageAccountCSEFileName string = storageAccountCSEFileName + @description('The resource ID of the created SSH Key') output SSHKeyResourceID string = sshKey.id diff --git a/modules/Microsoft.Compute/virtualMachines/.test/linux/deploy.test.bicep b/modules/Microsoft.Compute/virtualMachines/.test/linux/deploy.test.bicep index f990ab5eea..a2710bd5f7 100644 --- a/modules/Microsoft.Compute/virtualMachines/.test/linux/deploy.test.bicep +++ b/modules/Microsoft.Compute/virtualMachines/.test/linux/deploy.test.bicep @@ -132,8 +132,8 @@ module testDeployment '../../deploy.bicep' = { vmSize: 'Standard_B12ms' availabilityZone: 1 backupPolicyName: resourceGroupResources.outputs.recoveryServicesVaultBackupPolicyName - backupVaultName: last(split(resourceGroupResources.outputs.recoveryServicesVaultResourceId, '/')) - backupVaultResourceGroup: (split(resourceGroupResources.outputs.recoveryServicesVaultResourceId, '/'))[4] + backupVaultName: resourceGroupResources.outputs.recoveryServicesVaultName + backupVaultResourceGroup: resourceGroupResources.outputs.recoveryServicesVaultResourceGroupName dataDisks: [ { caching: 'ReadWrite' @@ -171,7 +171,7 @@ module testDeployment '../../deploy.bicep' = { ] } extensionCustomScriptProtectedSetting: { - commandToExecute: 'value=$(./${last(split(resourceGroupResources.outputs.storageAccountCSEFileUrl, '/'))}); echo "$value"' + commandToExecute: 'value=$(./${resourceGroupResources.outputs.storageAccountCSEFileName}); echo "$value"' } extensionDependencyAgentConfig: { enabled: true diff --git a/modules/Microsoft.Compute/virtualMachines/.test/windows/dependencies.bicep b/modules/Microsoft.Compute/virtualMachines/.test/windows/dependencies.bicep index fe18973a09..07e5e40f23 100644 --- a/modules/Microsoft.Compute/virtualMachines/.test/windows/dependencies.bicep +++ b/modules/Microsoft.Compute/virtualMachines/.test/windows/dependencies.bicep @@ -281,8 +281,11 @@ output managedIdentityResourceId string = managedIdentity.id @description('The resource ID of the created Load Balancer Backend Pool.') output loadBalancerBackendPoolResourceId string = loadBalancer.properties.backendAddressPools[0].id -@description('The resource ID of the created Recovery Services Vault.') -output recoveryServicesVaultResourceId string = recoveryServicesVault.id +@description('The name of the created Recovery Services Vault.') +output recoveryServicesVaultName string = recoveryServicesVault.name + +@description('The name of the Resource Group, the Recovery Services Vault was created in.') +output recoveryServicesVaultResourceGroupName string = resourceGroup().name @description('The name of the Backup Policy created in the Backup Recovery Vault.') output recoveryServicesVaultBackupPolicyName string = backupPolicyName @@ -299,6 +302,9 @@ output keyVaultEncryptionKeyUrl string = keyVault::key.properties.keyUriWithVers @description('The resource ID of the created Storage Account.') output storageAccountResourceId string = storageAccount.id +@description('The name of the Custom Script Extension in the created Storage Account') +output storageAccountCSEFileName string = storageAccountCSEFileName + @description('The URL of the Custom Script Extension in the created Storage Account') output storageAccountCSEFileUrl string = '${storageAccount.properties.primaryEndpoints.blob}${storageContainerName}/${storageAccountCSEFileName}' diff --git a/modules/Microsoft.Compute/virtualMachines/.test/windows/deploy.test.bicep b/modules/Microsoft.Compute/virtualMachines/.test/windows/deploy.test.bicep index 1dff4148fd..bbb24c5ce6 100644 --- a/modules/Microsoft.Compute/virtualMachines/.test/windows/deploy.test.bicep +++ b/modules/Microsoft.Compute/virtualMachines/.test/windows/deploy.test.bicep @@ -131,8 +131,8 @@ module testDeployment '../../deploy.bicep' = { adminPassword: password availabilityZone: 2 backupPolicyName: resourceGroupResources.outputs.recoveryServicesVaultBackupPolicyName - backupVaultName: last(split(resourceGroupResources.outputs.recoveryServicesVaultResourceId, '/')) - backupVaultResourceGroup: (split(resourceGroupResources.outputs.recoveryServicesVaultResourceId, '/'))[4] + backupVaultName: resourceGroupResources.outputs.recoveryServicesVaultName + backupVaultResourceGroup: resourceGroupResources.outputs.recoveryServicesVaultResourceGroupName dataDisks: [ { caching: 'None' @@ -187,7 +187,7 @@ module testDeployment '../../deploy.bicep' = { ] } extensionCustomScriptProtectedSetting: { - commandToExecute: 'powershell -ExecutionPolicy Unrestricted -Command "& ./${last(split(resourceGroupResources.outputs.storageAccountCSEFileUrl, '/'))}"' + commandToExecute: 'powershell -ExecutionPolicy Unrestricted -Command "& ./${resourceGroupResources.outputs.storageAccountCSEFileName}"' } extensionDependencyAgentConfig: { enabled: true diff --git a/modules/Microsoft.DataProtection/backupVaults/deploy.bicep b/modules/Microsoft.DataProtection/backupVaults/deploy.bicep index 83142c5e46..16759c7005 100644 --- a/modules/Microsoft.DataProtection/backupVaults/deploy.bicep +++ b/modules/Microsoft.DataProtection/backupVaults/deploy.bicep @@ -66,7 +66,7 @@ resource backupVault 'Microsoft.DataProtection/backupVaults@2022-03-01' = { name: name location: location tags: tags - identity: any(identity) + identity: identity properties: { storageSettings: [ { diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/dependencies.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/dependencies.bicep index d9b11aa7c6..254c058117 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/dependencies.bicep +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/dependencies.bicep @@ -25,5 +25,5 @@ resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2021-07-12' = { @description('The principal ID of the created Managed Identity.') output managedIdentityPrincipalId string = managedIdentity.properties.principalId -@description('The resource ID of the created Host Pool.') -output hostPoolResourceId string = hostPool.id +@description('The name of the created Host Pool.') +output hostPoolName string = hostPool.name diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep index c7dcafd8f9..0f13da7ae2 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep @@ -57,7 +57,7 @@ module testDeployment '../../deploy.bicep' = { params: { name: '<>${serviceShort}001' applicationGroupType: 'RemoteApp' - hostpoolName: last(split(resourceGroupResources.outputs.hostPoolResourceId, '/')) + hostpoolName: resourceGroupResources.outputs.hostPoolName applications: [ { commandLineArguments: '' diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep index a11899cd86..d178ddbd3d 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep @@ -14,5 +14,5 @@ resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2021-07-12' = { } } -@description('The resource ID of the created Host Pool.') -output hostPoolResourceId string = hostPool.id +@description('The name of the created Host Pool.') +output hostPoolName string = hostPool.name diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep index e8bd8fb8d3..5ba1fe6038 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep @@ -42,6 +42,6 @@ module testDeployment '../../deploy.bicep' = { params: { name: '<>${serviceShort}001' applicationGroupType: 'RemoteApp' - hostpoolName: last(split(resourceGroupResources.outputs.hostPoolResourceId, '/')) + hostpoolName: resourceGroupResources.outputs.hostPoolName } } diff --git a/modules/Microsoft.RecoveryServices/vaults/deploy.bicep b/modules/Microsoft.RecoveryServices/vaults/deploy.bicep index ce8960d6cc..27e37de2ca 100644 --- a/modules/Microsoft.RecoveryServices/vaults/deploy.bicep +++ b/modules/Microsoft.RecoveryServices/vaults/deploy.bicep @@ -166,7 +166,7 @@ resource rsv 'Microsoft.RecoveryServices/vaults@2022-09-10' = { name: name location: location tags: tags - identity: any(identity) + identity: identity sku: { name: 'RS0' tier: 'Standard' diff --git a/modules/Microsoft.ServiceFabric/clusters/.test/common/dependencies.bicep b/modules/Microsoft.ServiceFabric/clusters/.test/common/dependencies.bicep index 599effb4c0..3cf8c25ddd 100644 --- a/modules/Microsoft.ServiceFabric/clusters/.test/common/dependencies.bicep +++ b/modules/Microsoft.ServiceFabric/clusters/.test/common/dependencies.bicep @@ -27,5 +27,5 @@ resource storageAccount 'Microsoft.Storage/storageAccounts@2021-08-01' = { @description('The principal ID of the created Managed Identity.') output managedIdentityPrincipalId string = managedIdentity.properties.principalId -@description('The resource ID of the created Storage Account.') -output storageAccountResourceId string = storageAccount.id +@description('The name of the created Storage Account.') +output storageAccountName string = storageAccount.name diff --git a/modules/Microsoft.ServiceFabric/clusters/.test/common/deploy.test.bicep b/modules/Microsoft.ServiceFabric/clusters/.test/common/deploy.test.bicep index b1ced00167..1650093be6 100644 --- a/modules/Microsoft.ServiceFabric/clusters/.test/common/deploy.test.bicep +++ b/modules/Microsoft.ServiceFabric/clusters/.test/common/deploy.test.bicep @@ -92,11 +92,11 @@ module testDeployment '../../deploy.bicep' = { } ] diagnosticsStorageAccountConfig: { - blobEndpoint: 'https://${last(split(resourceGroupResources.outputs.storageAccountResourceId, '/'))}.blob.${environment().suffixes.storage}/' + blobEndpoint: 'https://${resourceGroupResources.outputs.storageAccountName}.blob.${environment().suffixes.storage}/' protectedAccountKeyName: 'StorageAccountKey1' - queueEndpoint: 'https://${last(split(resourceGroupResources.outputs.storageAccountResourceId, '/'))}.queue.${environment().suffixes.storage}/' - storageAccountName: last(split(resourceGroupResources.outputs.storageAccountResourceId, '/')) - tableEndpoint: 'https://${last(split(resourceGroupResources.outputs.storageAccountResourceId, '/'))}.table.${environment().suffixes.storage}/' + queueEndpoint: 'https://${resourceGroupResources.outputs.storageAccountName}.queue.${environment().suffixes.storage}/' + storageAccountName: resourceGroupResources.outputs.storageAccountName + tableEndpoint: 'https://${resourceGroupResources.outputs.storageAccountName}.table.${environment().suffixes.storage}/' } fabricSettings: [ {