What you need to know
Review the tag-to-schema mapping instead of accepting one loosely specified object for every mode.
Potentially affected
ARM JSON templates using languageVersion 2.0 type definitions.
DSE recommendation
DSE recommends documenting the tag and its corresponding schema together.
Source facts
ARM type definitions are available with languageVersion 2.0 and allow a type to be reused. A discriminator chooses the applicable schema from a designated property. Microsoft’s example maps one tag to integer-valued properties and another to string-valued properties, rejecting an object that mixes the wrong shape with the selected tag. Microsoft Learn.
Applicability
Consider this design when one input object represents alternative configuration modes. Identify the property that chooses the mode and list the fields and types required for each alternative. Keep that contract distinct from a single object that merely permits optional fields.
DSE recommendation
DSE recommends documenting the tag and its corresponding schema together. Review each alternative with the module’s callers, including how a mode change affects the accompanying fields. Prefer a deliberate mapping over assuming that an object accepted for one mode is suitable for all others. Keep unrelated configuration variants out of the same type unless there is a clear reason to share their contract.
Verification
Build synthetic examples for every supported tag and then cross-pair a tag with another alternative’s fields or value types. Validate those cases against the exact template version, including an unsupported tag and a missing selector. Record the intended acceptance result before execution and compare it with the actual result. Recheck all alternatives when the mapping changes so adding one mode does not silently redefine another.
Official references
Microsoft Learn. Source retrieved September 9, 2026.
Review the official source
Type definitions in templates - 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