What you need to know
Review membership and item-count requirements separately before accepting a deployment input.
Potentially affected
Bicep templates with array deployment parameters.
DSE recommendation
DSE recommends reviewing the parameter declaration alongside the caller's intended selection.
Source facts
Bicep allows an array parameter to contain a subset of its permitted values; the allowed-values list is not a requirement to supply the entire list. The minLength and maxLength constraints address array item counts. For a string, those constraints instead measure characters. Microsoft Learn.
Applicability
Use this distinction when a module receives a selection list. Write down whether the business requirement concerns permitted choices, a minimum number of choices, or an explicitly required combination. Do not label those different requirements simply as input validation.
DSE recommendation
DSE recommends reviewing the parameter declaration alongside the caller’s intended selection. Express the required item-count bounds separately from permitted membership, and document any combination requirement that still needs its own validation design. Avoid expanding the allowed set merely to make a failing deployment pass; resolve whether the rejected value or the contract is wrong first.
Verification
Prepare controlled cases containing an allowed subset, an unapproved entry, and inputs on either side of the intended count boundary. Compare each result with the written requirement before approving the module revision. Retain the parameter declaration and synthetic test inputs together. Include a case with fewer selections than the complete allowed list so the test does not accidentally assume that every choice must always be present.
Official references
Microsoft Learn. Source retrieved September 9, 2026.
Review the official source
Parameters in Bicep files - Azure Resource Manager | Microsoft Learn · Verified September 9, 2026
Need help applying this guidance safely?
DSE can help confirm applicability, protect service continuity, and validate the result across physical security and IT systems.
Talk with DSE