You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@description('The name of the Azure Storage account')
paramstorageAccountNamestring = toLower(substring('stg${uniqueString(resourceGroup().id, deployment().name)}', 0, 23))
@description('The name of the blob container')
paramblobContainerNamestring = 'blobcontainer${uniqueString(resourceGroup().id, deployment().name)}'
@description('The name of the file share')
paramfileShareNamestring = 'fileshare${uniqueString(resourceGroup().id, deployment().name)}'resourcestorageAccount'Microsoft.Storage/storageAccounts@2022-09-01' = {
name: storageAccountNamelocation: resourceGroup().locationsku: {
name: 'Standard_LRS'
}
kind: 'StorageV2'properties: {
accessTier: 'Hot'
}
}
resourceblobContainer'Microsoft.Storage/storageAccounts/blobServices/containers@2022-09-01' = {
name: '${storageAccount.name}/default/${blobContainerName}'properties: {
publicAccess: 'None'
}
}
resourcefileShare'Microsoft.Storage/storageAccounts/fileServices/shares@2022-09-01' = {
name: '${storageAccount.name}/default/${fileShareName}'properties: {
shareQuota: 100
}
}
To Reproduce
Old-school deployment gives expected error:
Deployment template validation failed: 'The template expression in parameter 'storageAccountName' at line '1' and column '302' is not valid: Unable to evaluate the template language function 'substring'. The index and length parameters must refer to a location within the string. The index parameter: '0', the length parameter: '23', the length of the string parameter: '16'. Please see https://aka.ms/arm-function-substring for usage details.'.
Status: 400 (Bad Request)
ErrorCode: InvalidTemplate
Deloyment pane gives this:
The text was updated successfully, but these errors were encountered:
@StephenWeatherford could you try this out with the latest from main? It looks like the same problem that #16257 intended to fix (which hasn't yet been released).
Bicep version
0.33.13 and .33.95 at least
Describe the bug
To Reproduce
Old-school deployment gives expected error:
Deloyment pane gives this:
The text was updated successfully, but these errors were encountered: