File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
src/Aspire.Hosting.Azure.AppContainers
tests/Aspire.Hosting.Azure.Tests Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,9 @@ public static IResourceBuilder<AzureContainerAppEnvironmentResource> AddAzureCon
223223 _ => throw new NotSupportedException ( )
224224 } ;
225225
226+ // Remove '.' and '-' characters from volumeName
227+ volumeName = volumeName . Replace ( "." , "" ) . Replace ( "-" , "" ) ;
228+
226229 share . Name = BicepFunction . Take (
227230 BicepFunction . Interpolate (
228231 $ "{ BicepFunction . ToLower ( output . resource . Name ) } -{ BicepFunction . ToLower ( volumeName ) } ") ,
@@ -253,11 +256,10 @@ public static IResourceBuilder<AzureContainerAppEnvironmentResource> AddAzureCon
253256 identity . Name = BicepFunction . Interpolate ( $ "mi-{ resourceToken } ") ;
254257 containerRegistry . Name = new FunctionCallExpression (
255258 new IdentifierExpression ( "replace" ) ,
256- new InterpolatedStringExpression (
257- [
258- new StringLiteralExpression ( "acr-" ) ,
259+ new InterpolatedStringExpression ( [
260+ new StringLiteralExpression ( "acr-" ) ,
259261 new IdentifierExpression ( resourceToken . BicepIdentifier )
260- ] ) ,
262+ ] ) ,
261263 new StringLiteralExpression ( "-" ) ,
262264 new StringLiteralExpression ( "" ) ) ;
263265 laWorkspace . Name = BicepFunction . Interpolate ( $ "law-{ resourceToken } ") ;
Original file line number Diff line number Diff line change @@ -3231,7 +3231,7 @@ public async Task AddContainerAppEnvironmentAddsEnvironmentResource(bool useAzdN
32313231 . AddDatabase ( "db" ) ;
32323232
32333233 builder . AddContainer ( "cache" , "redis" )
3234- . WithVolume ( "data " , "/data" )
3234+ . WithVolume ( "App.da-ta " , "/data" )
32353235 . WithReference ( pg ) ;
32363236
32373237 using var app = builder . Build ( ) ;
@@ -3366,7 +3366,7 @@ param userPrincipalId string
33663366 }
33673367
33683368 resource shares_volumes_cache_0 'Microsoft.Storage/storageAccounts/fileServices/shares@2024-01-01' = {
3369- name: take('${toLower('cache')}-${toLower('data ')}', 60)
3369+ name: take('${toLower('cache')}-${toLower('Appdata ')}', 60)
33703370 properties: {
33713371 enabledProtocols: 'SMB'
33723372 shareQuota: 1024
@@ -3375,7 +3375,7 @@ param userPrincipalId string
33753375 }
33763376
33773377 resource managedStorage_volumes_cache_0 'Microsoft.App/managedEnvironments/storages@2024-03-01' = {
3378- name: take('${toLower('cache')}-${toLower('data ')}', 32)
3378+ name: take('${toLower('cache')}-${toLower('Appdata ')}', 32)
33793379 properties: {
33803380 azureFile: {
33813381 accountName: env_storageVolume.name
You can’t perform that action at this time.
0 commit comments