Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This diagnostic occurs in a child resource definition when the parent property is specified, yet a fully qualified name is still used for the child resource.
Expected resource name to not contain any "/" characters. Child resources with a parent resource reference (via the parent property or via nesting) must not contain a fully qualified name. For more information, see Child resources.
Error
Don't use a fully qualified name with "/" characters.
The following example raises the diagnostic because a fully qualified name is used for the child resource.
resource demoStore0220 'Microsoft.Storage/storageAccounts@2023-05-01' = {
name: 'demoStore0220'
location: 'chinanorth3'
sku: {
name: 'Standard_LRS'
}
kind: 'StorageV2'
}
resource demoFileService0220 'Microsoft.Storage/storageAccounts/fileServices@2023-05-01' = {
parent: demoStore0220
name: 'demoStore0220/default'
}
You can fix the diagnostic by updating the child resource name.
resource demoStore0220 'Microsoft.Storage/storageAccounts@2023-05-01' = {
name: 'demoStore0220'
location: 'chinanorth3'
sku: {
name: 'Standard_LRS'
}
kind: 'StorageV2'
}
resource demoFileService0220 'Microsoft.Storage/storageAccounts/fileServices@2023-05-01' = {
parent: demoStore0220
name: 'default'
}
For more information, see Decorators.
For more information about Bicep diagnostics, see Bicep core diagnostics.