Description
openedon Nov 10, 2023
[Template Name goes here](VM Scale Set with autoscale running an IIS WebApp)
Issue Details
When I try to deploy main.bicep after creating resopurce group I get the error message
{"status":"Failed","error":{"code":"DeploymentFailed","target":"/subscriptions/f151ee3f-4725-460d-8e3b-82512dfda843/resourceGroups/bicepquickstart/providers/Microsoft.Resources/deployments/main","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"InvalidResourceReference","message":"Resource /subscriptions/f151ee3f-4725-460d-8e3b-82512dfda843/resourceGroups/BICEPQUICKSTART/providers/Microsoft.Network/loadBalancers/VMSSNAME6LB referenced by resource /subscriptions/f151ee3f-4725-460d-8e3b-82512dfda843/resourceGroups/BICEPQUICKSTART/providers/Microsoft.Compute/virtualMachineScaleSets/vmssname6 was not found. Please make sure that the referenced resource exists, and that both resources are in the same region.","details":[{"code":"NotFound","message":"Resource /subscriptions/f151ee3f-4725-460d-8e3b-82512dfda843/resourceGroups/BICEPQUICKSTART/providers/Microsoft.Network/loadBalancers/VMSSNAME6LB not found."}]}]}}
In spite of the fact that VMSSNAME6LB is created as you can notice in the azure screen
Repro steps (if necessary, delete otherwise)
- Create resource group
- az deployment group create --resource-group bicepquickstart --parameters vmssName=vmssfrombicep --template-file main.bicep