-
Notifications
You must be signed in to change notification settings - Fork 543
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
Handling of duplicate names - "The specified name 'appconfigolttwmle7kgse' is already in use #2954
Comments
Thanks for letting us know about this @christiannagel . Naming collisions are definitely something to be aware of and the guidance of not naming everything appconfig (or whatever makes sense for the resource you are working with). The problem with trying another random value is that you now need to keep track of that so that you don't use another random value next time you deploy. This is a problem in regular ARM/Bicep based deployments as well. The solution I've used in those circumstances is to have a name override parameter which is used in that environment to replace the name of that particular resource when a conflict does arise. We can probably do something similar here. |
I think the action here is producing a sample on how to get past this issue using the CDK callbacks. |
@mitchdenny is tihs docs? |
Yeah I think this is docs. You've gotta be unlucky but it will definitely happen from time to time (its more common for role assignment IDs). FWIW, you can override the name using the CDK callback - but using something other than var appConfig = builder.AddAzureAppConfiguration("appConfig", (resource, construct, store) =>
{
store.AssignProperty(p => p.Name, "'myaltname'");
}); |
@christiannagel just to answer why we wouldn't do your "best option" above. If you randomly change the name when there is a conflict, if you go to redeploy the same apphost to the same RG at a later stage and the appconfig resource has been removed then you'll end up in a confused state. It is always better for these things to be deterministic. |
Filing a doc suggestion for this: dotnet/docs-aspire#681 |
Using an Azure App Configuration resource with Azure provisioning
I had the error in the logs of Azure App Configuration that the name
appconfigolttwmle7kgse
is already in use, and the deployment failed. This resource name is not in my subscription but used somewhere in Azure.Now with .NET Aspire I expect that many run into this issue when names need to be globally unique.
I think there should be a better way to handle this, such as
Version:
aspire 8.0.0-preview.5.24162.5/8.0.100
The text was updated successfully, but these errors were encountered: