Template values should satisfy constraints#
Operational Excellence · All resources · Rule · 2026_09 · Awareness
Set parameter and output values to satisfy template constraints.
Description#
Azure Resource Manager (ARM) templates can define constraints for parameter and output values. Bicep decorators such as @allowed, @minLength, @maxLength, @minValue, @maxValue, and @validate compile into these template constraints.
When templates are expanded, this rule checks resolved parameter and output values against the compiled constraint fields:
allowedValuesminLengthmaxLengthminValuemaxValuevalidate
If a validate constraint includes a custom message, the message is used as the rule reason.
Recommendation#
Consider updating the supplied value to satisfy the parameter or output constraint.
Examples#
Configure with Bicep#
To configure deployments that pass this rule:
- Use values that satisfy decorators on parameters and outputs.
For example:
@allowed([
'Standard'
'Premium'
])
param skuName string = 'Standard'
@minValue(1)
param replicaCount int = 1
Notes#
This rule evaluates the compiled ARM template constraint shape emitted by Bicep. It does not parse Bicep source files directly.