MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.2k stars 21.34k forks source link

Clarify requirements for <linked-deployment-name> #95355

Closed sopelt closed 2 years ago

sopelt commented 2 years ago

The documentation should clarify the requirements for <linked-deployment-name> as there seem to be unexpected side-effects when deployment names are not unique in concurrent ARM operations. Without the clarification we have to assume that the name of the deployment might have to be unique to avoid "spilling links/output" between different top-level deployments.

An example (derived from a real-world scenario):

I assume that combining the deployment().name to the module deployment name (e.g. name: '${deployment().name}-cname') should resolve this issue given that we use unique release IDs as the top-level deployment name.

I think that this quickstart sample might face this issue. I assume that when main.bicep is deployed concurrently the nested nested.flowlogs.bicep is only executed once and referenced as deployFlowLogs.

In the "best case" it seems that concurrent deployments with non-unique nested deployments cause conflicts and fail. The more problematic case would be creation/configuration of resources with wrong values spilled from other deployments.

A clarification and documented best practices for naming modules/nested deployments would be great.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

MonikaReddy-MSFT commented 2 years ago

Thanks for bringing this to our attention. We will investigate it further and update you shortly.

MonikaReddy-MSFT commented 2 years ago

@sopelt - Thanks for bringing this to our attention. I'm going to assign this to the document author so they can update the document accordingly.

tfitzmac commented 2 years ago

@sopelt - thanks for this feedback. I was able to reproduce the issue of concurrent deployments with a static module name and the same scope interfering with the output. I'll add clarification to the article.

tfitzmac commented 2 years ago

I have added clarification to the article. It might be Monday morning before it is published.

please-close