-
Notifications
You must be signed in to change notification settings - Fork 815
Description
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I ran into a difficult bug where a module deployment simply got skipped and broke my scenario. I had defined a module like below which was concurrently deployed to the same RG using EV2. The parameters were different but the deployments used the same name as shown below. The ARM deployment team debugged the issue and pointed to the quirk which they have documented. https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/modules#define-modules.
If a module with a static name is deployed concurrently to the same scope, there's the potential for one deployment to interfere with the output from the other deployment. For example, if two Bicep files use the same module with the same static name (examplemodule) and are targeted to the same resource group, one deployment might show the wrong output. If you're concerned about concurrent deployments to the same scope, give your module a unique name. Another way to ensure unique module names is to leave out the name property, an unique module name will be generated automatically.
module dns 'Dns.bicep' = {
name: 'Dns'
scope: resourceGroup(dnsZoneResourceGroupName)
params: {
afdEndpointHostName: endpoint.properties.hostName
customDomainName: customDomainName
}
}
Describe the solution you'd like
A clear and concise description of what you want to happen.
A warning added to the name property line which tells the user about the danger of using a fixed name.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status