Skip to content

Commit fa9b475

Browse files
authored
DeID test failure on deidServiceName length (#48331)
* deidServiceName was over 24 chars now trunkating baseName to insure max 24 * Fix eastus2euap not available, now using eastus2
1 parent 9fcfb76 commit fa9b475

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

sdk/healthdataaiservices/test-resources.bicep

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ param baseName string
1515
param location string = resourceGroup().location
1616

1717
@description('The location of the resource. By default, this is the same as the resource group.')
18-
param deidLocation string = 'eastus2euap'
19-
param deidLocationShort string = 'eup'
18+
param deidLocation string = 'eastus2'
19+
param deidLocationShort string = 'eus2'
2020

2121
param deploymentTime string = utcNow('u')
2222

@@ -26,7 +26,10 @@ var storageBlobDataContributor = 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'
2626

2727
var blobStorageName = take(toLower(replace('blob-${baseName}', '-', '')), 24)
2828
var blobContainerName = 'container-${baseName}'
29-
var deidServiceName = 'deid-${baseName}-${deidLocationShort}'
29+
30+
var maxBaseNameLength = 24 - 5 - length(deidLocationShort) // 5 characters for 'deid-' and 1 for '-'
31+
var truncatedBaseName = take(baseName, maxBaseNameLength)
32+
var deidServiceName = 'deid-${truncatedBaseName}-${deidLocationShort}'
3033

3134
resource storageAccount 'Microsoft.Storage/storageAccounts@2022-05-01' = {
3235
name: blobStorageName

0 commit comments

Comments
 (0)