Bicep error code - BCP063

This error occurs when the system tries to locate a name within the context, but no matching name is found.

Error description

The name <name> isn't a parameter, variable, resource, or module.

Solutions

Use the property declaration types. For more information, see Bicep file.

Examples

The following example raises the error because @metadata is not a correct declaration type:

@metadata
resource store 'Microsoft.Storage/storageAccounts@2023-05-01' existing = {
  name: 'mystore'
}

You can fix the error by properly declaring metadata.

metadata description = 'create a storage account'

resource store 'Microsoft.Storage/storageAccounts@2023-05-01' existing = {
  name: 'mystore'
}

For more information, see Metadata.

Next steps

For more information about Bicep error and warning codes, see Bicep core diagnostics.