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 when you specify an invalid format of a resource type.
Description
The resource type isn't valid. Specify a valid resource type of format <types>@<apiVersion>.
Level
Error
Solution
Use the valid format of resource type.
Examples
The following example raises the diagnostic because the Microsoft.Storage/storageAccounts resource type requires an API version:
param location string = resourceGroup().location
resource storage 'Microsoft.Storage/storageAccounts' = {
name: 'mystorageacct'
location: location
sku: {
name: 'Standard_LRS'
}
kind: 'StorageV2'
}
You can fix the diagnostic by providing an API version:
param location string = resourceGroup().location
resource storage 'Microsoft.Storage/storageAccounts@2025-01-01' = {
name: 'mystorageacct'
location: location
sku: {
name: 'Standard_LRS'
}
kind: 'StorageV2'
}
Next steps
For more information about Bicep diagnostics, see Bicep core diagnostics.