Azure / azure-policy

Repository for Azure Resource Policy built-in definitions and samples
MIT License
1.51k stars 1.09k forks source link

Collection of built-in policies for diagnostics parameters "metricsEnabled" and "logsEnabled" some are type boolean and others are string. #1107

Open pmatthews05 opened 1 year ago

pmatthews05 commented 1 year ago

Details of the scenario you tried and the problem that is occurring

The following Diagnostic policies have both MetricsEnabled and LogsEnabled parameters as type boolean

The following diagnostic policies have both MetricsEnabled and LogsEnabled parameters as type string

Suggested solution to the issue

Make all policies use the same type, either string or boolean. Personally I think they should be boolean as the value is either true or false.

NikolaiKleppe commented 1 year ago

This type inconsistency also causes some issues when combining Diagnostic Policies from Enterprise Scale and built-in policies, especially through Terraform

All diagnostic policies in Enterprise Scale uses the type "String" for metricsEnabled. This needs to be taken into consideration as well