-
Notifications
You must be signed in to change notification settings - Fork 802
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
The name given by Aspire to resources contains too many static characters. Which means the uniqueString suffix is not applied causing issues when trying to deploy multiple environments.
Example Azure App Container:
| storageVolume = new StorageAccount(Infrastructure.NormalizeBicepIdentifier($"{appEnvResource.Name}_storageVolume")) |
storageVolume = new StorageAccount(Infrastructure.NormalizeBicepIdentifier($"{appEnvResource.Name}_storageVolume"))It always adds storageVolume (13 characters) to the resource name. The maximum length of a storage volume is 24 characters. So if my chosen AddAzureContainerAppEnvironment name is 11 characters or longer then I cannot deploy multiple environments. And even when it is 10 characters long I have a high conflict probability.
Expected Behavior
Static strings applied by Aspire to resource names are as short as possible.
For example AzureContainerAppExtensions changes:
storageVolume->svshares->smanagedStorage->ms
Steps To Reproduce
Create AddAzureContainerAppEnvironment with a name of 11 characters (or more) and a volume. Try to deploy two environments. The second deployment will fail with StorageAccountAlreadyTaken.
Exceptions (if any)
No response
.NET Version info
No response
Anything else?
$/aspire --version
13.1.0+8a4db1775c3fbae1c602022b636299cb04971fde