Fix PlanInstanceCount applicability for Flex Consumption plans - #3930
Open
Brandon Waterloo [MSFT] (bwateratmsft) wants to merge 1 commit into
Open
Brandon Waterloo [MSFT] (bwateratmsft) wants to merge 1 commit into
Brandon Waterloo [MSFT] (bwateratmsft) wants to merge 1 commit into
Conversation
Exclude FC1 and FlexConsumption plans, add regression coverage, and clarify rule documentation. Fixes Azure#3929 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Brandon Waterloo [MSFT] (bwateratmsft)
requested a review
from a team
as a code owner
September 25, 2026 13:36
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖
PR Summary
Fixes #3929.
Azure.AppService.PlanInstanceCountincorrectly checks Azure Functions Flex Consumption plans forsku.capacity >= 2. RecognizeFC1SKU names or theFlexConsumptiontier inIsConsumptionPlanso these plans are not applicable to the rule, without requiring capacity or changing Dedicated-plan validation.Adds 17 focused cases covering independent SKU-name and tier detection, omitted and single-instance capacity, both identifiers, case-insensitive matching, existing Y1/Dynamic and Elastic Premium exclusions, and Dedicated plans with omitted/one/two/three-instance capacity. Updates the rule documentation and Unreleased changelog.
Validation: built the module with the repository's .NET build/publish commands; reproduced all seven Flex Consumption failures before the fix; all 44 tests in
Azure.AppService.Tests.ps1pass after the fix. PowerShell parser andgit diff --checkchecks pass. Tests used PSRule 2.9.0 and installed Pester 6.1.0 without test-framework adaptations; the declared Pester 5.9.1 and PSScriptAnalyzer 1.24.0 were unavailable, and no repository trust settings were changed. Full-repository tests and PSScriptAnalyzer were not run.PR Checklist