Add DdosEnabled toggle and fix logic modPolicyAssignmentConnEnableDdos #810
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/Summary
Closed #701 but copied over PR form as author is on PTO and I am unable to make necessary changes into their PR branch.
Closes Bug #596 and @jamiepla1 flagged this. Policy issue around
parDdosProtectionPlanId
, because by defaultparDdosProtectionPlanId
is populated during creation of ALZ-Bicep Accelerator. If you don't clean (empty) or catch this, it will deploy a policyEnable-DDoS-VNET
. This will block the creation of Virtual Networks in the Connectivity Subscription if you disable/falseparDdosEnabled
in other areas of ALZ-Bicep. To get around this, simply adding the boolean/toggle ofparDdosEnabled
will now make this not enable by default even ifparDdosProtectionPlanId
. Making this uniformed across the ALZ-Bicep deployment.This PR fixes/adds/changes/removes
Within the Module
modPolicyAssignmentConnEnableDdosVnet
the variableparPolicyAssignmentIdentityType
,parDisableAlzDefaultPolicies
was removed in favor of havingparDdosEnabled
. This allows the policy to be added, but not inforced ifparDdosEnabled
is false. If the end-user forgets to setparDdosEnabled
, then they will get an error when deploying networking within Connectivity Subscription.parPolicyAssignmentEnforcementMode: !parDdosEnabled ? 'DoNotEnforce' : varPolicyAssignmentEnableDDoSVNET.libDefinition.properties.enforcementMode
When deploying Hub in Connectivity Subscription the following happens if
Enable-DDoS-VNET
is enforced**Disclaimer
It should be documented that DDoS Protection is a recommendation, therefor the policy is in a non-compliant state as when it is turned to
parDdosEnabled = false
, as it is not being enforced.Breaking Changes
Testing Evidence
As part of this Pull Request I have
.bicep
file/s I am adding/editing are using the latest API version possiblemain
branch