Azure / bicep-types-az

Bicep type definitions for ARM resources
MIT License
86 stars 27 forks source link

[Microsoft.ApiManagement service/apis/diagnostics]: Valid values for name are not documented #1439

Open Xandven opened 1 year ago

Xandven commented 1 year ago

Resource Type

Microsoft.ApiManagement service/apis/diagnostics

Api Version

2022-08-01

Issue Type

Confusing error message on deployment

Other Notes

The Name is documented to be a string. When deploying using any name the deployment will fail with the following error:

[{"code":"ValidationError","message":"Provided diagnostic Id 'dgs-xxx' is not supported. Please, refer to documentation for accepted dignostic Id values."}]}

The referenced documentation does not seem to exist here https://learn.microsoft.com/en-us/azure/templates/microsoft.apimanagement/service/apis/diagnostics?pivots=deployment-language-bicep

It turns out that the name only has two possible values: applicationinsights and azuremonitor.

I would suggest to update the documentation to reflect this and add allowed values to the name so that invalid names are detected prior to deployment.

Bicep Repro

No response

Confirm

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @adrianhall, @KedarJoshi. Please see https://aka.ms/biceptypesinfo for troubleshooting help.

Issue Details
### Resource Type Microsoft.ApiManagement service/apis/diagnostics ### Api Version 2022-08-01 ### Issue Type Confusing error message on deployment ### Other Notes The Name is documented to be a string. When deploying using any name the deployment will fail with the following error: `[{"code":"ValidationError","message":"Provided diagnostic Id 'dgs-xxx' is not supported. Please, refer to documentation for accepted dignostic Id values."}]}` The referenced documentation does not seem to exist here https://learn.microsoft.com/en-us/azure/templates/microsoft.apimanagement/service/apis/diagnostics?pivots=deployment-language-bicep It turns out that the name only has two possible values: applicationinsights and azuremonitor. I would suggest to update the documentation to reflect this and add allowed values to the name so that invalid names are detected prior to deployment. ### Bicep Repro _No response_ ### Confirm - [X] I have read the troubleshooting guide and looked for duplicates.
Author: Xandven
Assignees: -
Labels: `inaccuracy`, `RP: Microsoft.ApiManagement`, `Service Attention`, `API Management`
Milestone: -
tony-box commented 5 months ago

I'm working on the Bicep Azure Verified Module and also ran into this problem. Bumping this issue to get resolved. I will be allowing only the two options in the AVM module.

cathei commented 2 months ago

Bump, and why can't what-if catch this?