It's not documented, but tags
resources appear to require the displayName property. It must be configured to match the name to avoid potential issues with other parts of APIM. If this property is not provided, you will see the error message indicating 'name should not be empty'. This may be a bug in the resource provider. I also recommend moving to a later schema, such as 2021-08-01 so that you're not working with a preview API version.
Because this modification conflicts with the documented schema for that resource type, you'll need to also take advantage of a newer Bicep feature, #disable-next-line
. This eliminates the warning (BCP073) that you receive indicating that property is read-only.
Hopefully this gives you a viable workaround, @Shawn Pottle . The modified code:
//Tags
resource service_TestTag 'Microsoft.ApiManagement/service/tags@2021-08-01' = {
parent: service_name_resource
name: 'TestTag'
properties: {
#disable-next-line BCP073
displayName: 'TestTag'
}
}