Skip to content

fix: correct deprecated MDFC sub-plan defaults in Deploy-MDFC-Config_20240319 (#4203) - #2180

Open
Pratyush Verma (pratyushverma63) wants to merge 2 commits into
Azure:mainfrom
pratyushverma63:fix/4203-mdfc-config-subplan-defaults
Open

fix: correct deprecated MDFC sub-plan defaults in Deploy-MDFC-Config_20240319 (#4203)#2180
Pratyush Verma (pratyushverma63) wants to merge 2 commits into
Azure:mainfrom
pratyushverma63:fix/4203-mdfc-config-subplan-defaults

Conversation

@pratyushverma63

@pratyushverma63 Pratyush Verma (pratyushverma63) commented Aug 4, 2026

Copy link
Copy Markdown

Overview

Fixes #4203

Microsoft Defender for Cloud has fully deprecated two sub-plans that Deploy-MDFC-Config_20240319 uses as parameter default values. New deployments (or re-enablement) that rely on these defaults now fail with InvalidInputError:

  • ascForKeyVaultSubPlan default PerTransaction (deprecated) -> PerKeyVault
  • ascForArmSubPlan default PerApiCall (deprecated) -> PerSubscription

Changes

  • src/resources/Microsoft.Authorization/policySetDefinitions/Deploy-MDFC-Config_20240319.json — updated the two defaultValue fields to the supported plans. allowedValues are left unchanged so subscriptions already on the deprecated plans remain valid.
  • eslzArm/managementGroupTemplates/policyDefinitions/initiatives.json — regenerated via bicep build ./src/templates/initiatives.bicep --outfile ./eslzArm/managementGroupTemplates/policyDefinitions/initiatives.json.

Breaking change assessment

Per the ALZ Contribution Guide definition (change to policy Name or number of parameters), this is not a breaking change

Validation

  • initiatives.json is valid JSON and matches a fresh bicep build after the CI metadata-strip + ordering normalization used by the Check Policy Build test.

Testing

  1. Live validation against Microsoft.Security/pricings

Validated against the actual API the policy's deployIfNotExists calls, on a test subscription (Defender plans reverted to Free afterward):

Reproduces the bug — OLD defaults are rejected:

image

Confirms the fix — NEW defaults succeed:

image

Both corrected sub-plans are accepted, confirming the deployment error from #4203 is resolved.

…0240319

ascForArmSubPlan default PerApiCall -> PerSubscription and ascForKeyVaultSubPlan default PerTransaction -> PerKeyVault. The previous defaults are deprecated and cause InvalidInputError on new deployments. allowedValues retained for backward compatibility. Regenerated initiatives.json via bicep build. Fixes #4203
@pratyushverma63

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Microsoft"

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Policy Definition for Deploy-MDFC-Config_20240319 has the wrong default values.

1 participant