Azure-Samples / Azure-Samples/functions-quickstart-dotnet-azd
Hardcoded names in "infra/app/storage-PrivateEndpoint.bicep" cause deployment errors.
- Dominant language
- Bicep
- Stars
- 30
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
Error message example:
DeploymentActive: The deployment with resource id '/subscriptions/12********34/resourceGroups/rg-xyz-dev/providers/Microsoft.Resources/deployments/blob-private-dns-zone-deployment' cannot be saved, because this would overwrite an existing deployment which is still active. If this is an intentional re-deployment, please wait for the original deployment to complete, or cancel it before re-attempting the operation. The previous deployment was started at '4/8/2026 4:02:59 AM' with correlationId '56**********6e', and will expire at '4/15/2026 4:02:59 AM' if it does not complete before then. Please see https://aka.ms/arm-deploy-resources for usage details.
This occurred after I tried to reuse the modules in "infra/app/storage-PrivateEndpoint.bicep", from another storage account resource that I added to main.bicep.
PROPOSED SOLUTION:
1. Add a **new variable** _above_ // Storage DNS zone names
var deploymentSuffix = take(toLower(uniqueString(resourceName, virtualNetworkName)), 6)
2. Make the values of the existing variables unique:
// Storage DNS zone names
var blobPrivateDNSZoneName = 'privatelink.blob.${environment().suffixes.storage}.${resourceName}.${deploymentSuffix}'
var queuePrivateDNSZoneName = 'privatelink.queue.${environment().suffixes.storage}.${resourceName}.${deploymentSuffix}'
var tablePrivateDNSZoneName = 'privatelink.table.${environment().suffixes.storage}.${resourceName}.${deploymentSuffix}'
3. Search-and-replace all **name properties**
**from**: 'blob-private-endpoint-deployment'
**to**: 'blob-private-endpoint-deployment-${resourceName}-${deploymentSuffix}'
4. Search-and-replace all **name parameters**
**from**: 'blob-private-endpoint'
**to**: 'blob-private-endpoint-${resourceName}-${deploymentSuffix}'
Contributor guide
Assessment
This issue has not been assessed yet.