Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New article]: Troubleshooting "name [resource name] is already in use" #681

Closed
mitchdenny opened this issue Apr 16, 2024 · 0 comments · Fixed by #1037
Closed

[New article]: Troubleshooting "name [resource name] is already in use" #681

mitchdenny opened this issue Apr 16, 2024 · 0 comments · Fixed by #1037
Assignees
Labels
doc-idea Indicates issues that are suggestions for new topics [org][type][category] documentation Improvements or additions to documentation dotnet-aspire/prod Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@mitchdenny
Copy link
Member

mitchdenny commented Apr 16, 2024

Proposed topic or title

Troubleshooting name already in use when deploying Aspire application sto Azure

Location in table of contents.

Troubleshooting

Reason for the article

When deploying an Aspire application to Azure, resources in the application are turned into Azure resources. Azure resources sometimes have a globally scoped name. A good example is Azure AppConfig where all AppConfig instances are in the [name].azconfig.io global namespace.

The value of [name] is derived from the Aspire resource name plus some random characters based on the name of the resource group that the resource is deployed in. Because the [uniqueString(...)] function that is used to generate these random characters produces a string that when combined with the resource name would exceed the allowable resource name length for AppConfig (in this example), some of the characters are truncated.

Unfortunately this creates an opportunity where the combination of [name]+[truncated hash] isn't sufficiently unique to avoid conflicts in the global namespace. When a conflict occurs the resource fails to deploy.

We need an article that explains this, and also proposes workarounds. One workaround is to avoid using common names like appconfig or storage for resources and instead pick a name which is more application specific.

Depending on the string the potential for conflict is reduced but not eliminated. In these cases knowing how to use the callback methods to set a specific name to avoid using the computed string altogether might be desirable.

Article abstract

When deploying to Azure initial deployments may fail if the resource name is already in use. This article describes several techniques to avoid this problem.

Relevant searches

No response


Associated WorkItem - 261090

@mitchdenny mitchdenny added the doc-idea Indicates issues that are suggestions for new topics [org][type][category] label Apr 16, 2024
@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Apr 16, 2024
@IEvangelist IEvangelist self-assigned this Jun 4, 2024
@IEvangelist IEvangelist added documentation Improvements or additions to documentation 🗺️ reQUEST Triggers an issue to be imported into Quest. Pri1 High priority, do before Pri2 and Pri3 dotnet-aspire/prod labels Jun 4, 2024
@dotnet-bot dotnet-bot removed ⌚ Not Triaged Not triaged labels Jun 4, 2024
IEvangelist added a commit to IEvangelist/docs-aspire that referenced this issue Jun 4, 2024
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-idea Indicates issues that are suggestions for new topics [org][type][category] documentation Improvements or additions to documentation dotnet-aspire/prod Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest.
Projects
No open projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants