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
223
223
_ => throw new NotSupportedException ( )
224
224
} ;
225
225
226
+ // Remove '.' and '-' characters from volumeName
227
+ volumeName = volumeName . Replace ( "." , "" ) . Replace ( "-" , "" ) ;
228
+
226
229
share . Name = BicepFunction . Take (
227
230
BicepFunction . Interpolate (
228
231
$ "{ BicepFunction . ToLower ( output . resource . Name ) } -{ BicepFunction . ToLower ( volumeName ) } ") ,
@@ -253,11 +256,10 @@ public static IResourceBuilder<AzureContainerAppEnvironmentResource> AddAzureCon
253
256
identity . Name = BicepFunction . Interpolate ( $ "mi-{ resourceToken } ") ;
254
257
containerRegistry . Name = new FunctionCallExpression (
255
258
new IdentifierExpression ( "replace" ) ,
256
- new InterpolatedStringExpression (
257
- [
258
- new StringLiteralExpression ( "acr-" ) ,
259
+ new InterpolatedStringExpression ( [
260
+ new StringLiteralExpression ( "acr-" ) ,
259
261
new IdentifierExpression ( resourceToken . BicepIdentifier )
260
- ] ) ,
262
+ ] ) ,
261
263
new StringLiteralExpression ( "-" ) ,
262
264
new StringLiteralExpression ( "" ) ) ;
263
265
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
3231
3231
. AddDatabase ( "db" ) ;
3232
3232
3233
3233
builder . AddContainer ( "cache" , "redis" )
3234
- . WithVolume ( "data " , "/data" )
3234
+ . WithVolume ( "App.da-ta " , "/data" )
3235
3235
. WithReference ( pg ) ;
3236
3236
3237
3237
using var app = builder . Build ( ) ;
@@ -3366,7 +3366,7 @@ param userPrincipalId string
3366
3366
}
3367
3367
3368
3368
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)
3370
3370
properties: {
3371
3371
enabledProtocols: 'SMB'
3372
3372
shareQuota: 1024
@@ -3375,7 +3375,7 @@ param userPrincipalId string
3375
3375
}
3376
3376
3377
3377
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)
3379
3379
properties: {
3380
3380
azureFile: {
3381
3381
accountName: env_storageVolume.name
You can’t perform that action at this time.
0 commit comments