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
I'm unable to declare a resource of type Microsoft.DocumentDB/databaseAccounts/providers/diagnosticSettings through Bicep.
Attempting to do so results in a warning for the type -
Resource type "Microsoft.DocumentDB/databaseAccounts/providers/diagnosticSettings@2017-05-01-preview" does not have types available. bicep(BCP081)
And adding required properties such as workspaceId and metrics results in an error for each property -
The property "workspaceId" is not allowed on objects of type "Microsoft.DocumentDB/databaseAccounts/providers/diagnosticSettings@2017-05-01-preview". Permissible properties include "dependsOn", "eTag", "extendedLocation", "identity", "kind", "location", "managedBy", "managedByExtended", "plan", "properties", "scale", "sku", "tags", "zones". bicep(BCP038)
The error is because you are missing the properties property as a top level property. Both workspaceId and metrics should be declared inside the properties object.
Bicep version
Describe the bug
I'm unable to declare a resource of type
Microsoft.DocumentDB/databaseAccounts/providers/diagnosticSettings
through Bicep.Attempting to do so results in a warning for the type -
And adding required properties such as
workspaceId
andmetrics
results in an error for each property -To Reproduce
Include the following resource in the bicep file.
Additional context
The following equivalent ARM template resource deploys as expected.
The text was updated successfully, but these errors were encountered: