Hardcoded names in "infra/app/storage-PrivateEndpoint.bicep" cause deployment errors.

Open Beginner friendly
#30 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
azure

Research direction

Open infra/app/storage-PrivateEndpoint.bicep and compare its deployment and name properties with the reuse described in the issue; check main.bicep for the additional storage account resource. Verify that the DNS zone variables and endpoint deployment names are unique per resource and that deployments no longer conflict when the module is reused.

Written by the indexing model from the issue text.

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}'

Dominant language
Bicep
Stars
30
Forks
42
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure-Samples/functions-quickstart-dotnet-azd

All issues in Azure-Samples/functions-quickstart-dotnet-azd

Similar issues

More Cloud issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.