Skip to content

Parameter value should match strong type#

Operational Excellence · All resources · Rule · 2021_12 · Awareness

Set the parameter value to a value that matches the specified strong type.

Description#

Template string parameters can optionally specify a strong type. When parameter files are expanded, if the parameter value does not match the type this rule fails. Support is provided by PSRule for Azure for the following types:

  • Resource type - Specify a resource type. For example Microsoft.OperationalInsights/workspaces. If a resource type is specified the parameter value must be a resource id of that type.
  • Location - Specify location as the strong type. If location is specified, the parameter value must be a valid Azure location.

Recommendation#

Consider updating the parameter value to a value that matches the specifed strong type.

Comments