When I create a policy definition using the portal with category "Guest Configuration", the resulting policy definition correctly includes "requiredProviders": ["Microsoft.GuestConfiguration"]
in the metadata
section.
I am unable to recreate the same using Azure CLI, specifically az policy definition create ... --metadata ...
. I have tried a number of variations with different quoting schemes, including brackets in the value, not including brackets in the value, using a bash list, etc., but these all result in a policy definition where requiredProviders
is some flavor of string, not an array.
So far I have not found any examples online of someone getting az policy definition create --metadata to result in an array in the resulting policy definition.
Note that I am not talking about passing multiple metadata key-value pairs. That is easily done with space delimiting. I am talking about a single KVP where the value is an array.