Skip to content

add support for bicep decorator value constraints#3828

Open
polatengin wants to merge 11 commits into
mainfrom
polatengin/3649-feature-add-support-for-validate-bicep-decorator
Open

add support for bicep decorator value constraints#3828
polatengin wants to merge 11 commits into
mainfrom
polatengin/3649-feature-add-support-for-validate-bicep-decorator

Conversation

@polatengin

Copy link
Copy Markdown
Member

Summary

Fixes #3649

Adds support for validating ARM template value constraints emitted by Bicep decorators on parameters and outputs.

This adds the new Azure.Template.ValueConstraint rule to check resolved values against:

  • allowedValues
  • minLength
  • maxLength
  • minValue
  • maxValue
  • validate

For @validate, the compiled ARM lambda expression is evaluated and any custom validation message is used as the rule reason.

PR Checklist

  • PR has a meaningful title
  • Summarized changes
  • Change is not breaking
  • This PR is ready to merge and is not Work in Progress
  • Rule changes
    • Unit tests created/ updated
    • Rule documentation created/ updated
    • Link to a filed issue
    • Change log has been updated with change under unreleased section
  • Other code changes
    • Unit tests created/ updated
    • Link to a filed issue
    • Change log has been updated with change under unreleased section

@polatengin polatengin added this to the v2.0.0 milestone Jun 8, 2026
@polatengin polatengin self-assigned this Jun 8, 2026
@polatengin polatengin requested a review from a team as a code owner June 8, 2026 17:19
@polatengin polatengin added enhancement New feature or request feature: bicep-language Issues relating to Bicep language support. labels Jun 8, 2026
@polatengin polatengin linked an issue Jun 8, 2026 that may be closed by this pull request

@BernieWhite BernieWhite left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @polatengin. All good to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature: bicep-language Issues relating to Bicep language support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add support for validate Bicep decorator

2 participants