Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[BUG] Azure.AppService.PlanInstanceCount incorrectly applies to Flex Consumption (FC1) plans

Aperta Adatta ai principianti
#3,929 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@bwateratmsft ci sta già lavorando.

Dal 25/9/2026.

  • #3930 di @bwateratmsft — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
azure, powershell
Ambito
devops, tooling

Direzione di ricerca

Inizia in src/PSRule.Rules.Azure/rules/Azure.AppService.Rule.ps1, in corrispondenza dell’helper IsConsumptionPlan citato nell’issue, quindi esamina la precondizione Azure.AppService.PlanInstanceCount. Riproduci il comportamento con l’input PowerShell fornito e verifica che FC1 o FlexConsumption sia escluso, mentre i piani Dedicated continuino a richiedere sku.capacity ��= 2.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

🤖

Existing rule

Azure.AppService.PlanInstanceCount (AZR-000071)

Description of the issue

The rule evaluates Azure Functions Flex Consumption App Service plans (sku.name: FC1, sku.tier: FlexConsumption) as though they were Dedicated plans and requires sku.capacity >= 2.

Flex Consumption scales dynamically and does not use the Dedicated-plan instance-count configuration. The rule already excludes classic Consumption and Elastic Premium, but IsConsumptionPlan only recognizes Y1 or the Dynamic tier. Consequently a valid FC1 plan without sku.capacity fails the rule instead of being excluded as not applicable.

Expected behavior: exclude Flex Consumption when identified by either its SKU name (FC1) or tier (FlexConsumption), while preserving the existing checks for Dedicated plans.

Error messages

Reproduced with the PowerShell input below:

RuleName      : Azure.AppService.PlanInstanceCount
Outcome       : Fail
OutcomeReason : Processed
Reason        : {Path sku.capacity: Does not exist.}
Reproduction

With PSRule 2.9.0 and PSRule.Rules.Azure 1.47.0 installed, run:

Import-Module PSRule -RequiredVersion 2.9.0
Import-Module PSRule.Rules.Azure -RequiredVersion 1.47.0

$plan = [pscustomobject]@{
    name = 'flex-example'
    type = 'Microsoft.Web/serverfarms'
    apiVersion = '2025-03-01'
    location = 'eastus'
    kind = 'functionapp'
    sku = @{
        name = 'FC1'
        tier = 'FlexConsumption'
    }
    properties = @{
        reserved = $true
    }
}

$plan | Invoke-PSRule -Module PSRule.Rules.Azure `
    -Name Azure.AppService.PlanInstanceCount -Outcome All |
    Select-Object RuleName, Outcome, OutcomeReason, Reason

No suppression groups are required to reproduce the failure.

Version of PSRule

2.9.0

Version of PSRule for Azure

1.47.0

Additional context
Lingua principale
PowerShell
Stelle
449
Fork
109
Merge medio
6g 1h
PR unite (30g)
9

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Azure/PSRule.Rules.Azure

Tutte le issue di Azure/PSRule.Rules.Azure

Issue simili

Altre issue su DevOps

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.