fix: correct deprecated MDFC sub-plan defaults in Deploy-MDFC-Config_20240319 (#4203) - #2180
Open
Pratyush Verma (pratyushverma63) wants to merge 2 commits into
Conversation
…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
Author
|
@microsoft-github-policy-service agree company="Microsoft" |
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.
Overview
Fixes #4203
Microsoft Defender for Cloud has fully deprecated two sub-plans that
Deploy-MDFC-Config_20240319uses as parameter default values. New deployments (or re-enablement) that rely on these defaults now fail withInvalidInputError:ascForKeyVaultSubPlandefaultPerTransaction(deprecated) ->PerKeyVaultascForArmSubPlandefaultPerApiCall(deprecated) ->PerSubscriptionChanges
src/resources/Microsoft.Authorization/policySetDefinitions/Deploy-MDFC-Config_20240319.json— updated the twodefaultValuefields to the supported plans.allowedValuesare left unchanged so subscriptions already on the deprecated plans remain valid.eslzArm/managementGroupTemplates/policyDefinitions/initiatives.json— regenerated viabicep build ./src/templates/initiatives.bicep --outfile ./eslzArm/managementGroupTemplates/policyDefinitions/initiatives.json.Breaking change assessment
Per the ALZ Contribution Guide definition (change to policy
Nameor number of parameters), this is not a breaking changeValidation
initiatives.jsonis valid JSON and matches a freshbicep buildafter the CI metadata-strip + ordering normalization used by theCheck Policy Buildtest.Testing
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:
Confirms the fix — NEW defaults succeed:
Both corrected sub-plans are accepted, confirming the deployment error from #4203 is resolved.