-
Notifications
You must be signed in to change notification settings - Fork 770
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to example for deployifnotexists-policy-with-initiative-and-a…
…ssignment (#1953) * add role assignment for policy assignment identity * fix incorrect parameter reference * bicep formatting * improve readme explanation of modules/usage * Update test baselines Co-authored-by: Bicep Automation <[email protected]>
- Loading branch information
1 parent
604fd20
commit 9d091e0
Showing
6 changed files
with
78 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,46 @@ | ||
# DeployIfNotExists Policy with Initiative and Assignment | ||
|
||
Resources Deployed: | ||
* 1x Resource Group | ||
* 1x Action Group | ||
* 1x Policy Definition with DeployIfNotExists effect for a Metric Alert v2 (Load Balancer - DipAvailability) | ||
* 1x Policy Initiative (policyset) | ||
* 1x Policy Assignment | ||
### Deployment Summary | ||
Resources Deployed | Bicep File | ||
:----------|:----- | ||
1x Resource Group | main.bicep | ||
1x Action Group | actionGroup.bicep | ||
1x Policy Definition with DeployIfNotExists effect for a Metric Alert v2 (Load Balancer - DipAvailability) | policyDefinition.bicep | ||
1x Policy Initiative (policyset) | policyDefinition.bicep | ||
1x Policy Assignment + 1x Role Assignment | policyAssignment.bicep | ||
------------------------ | ||
|
||
### Input Summary | ||
Parameter | Type | Default Value | ||
:----------|:-----|:-------- | ||
resourceGroupName | string | 'BicepExampleRG' | ||
resourceGrouplocation | string |'australiaeast' | ||
actionGroupName | string |'BicepExampleAG' | ||
actionGroupEnabled | bool |true | ||
actionGroupShortName | string |'bicepag' | ||
actionGroupEmailName | string |'jloudon' | ||
actionGroupEmail | string |'[email protected]' | ||
actionGroupAlertSchema | bool | true | ||
metricAlertResourceNamespace | string | 'Microsoft.Network/loadBalancers' | ||
metricAlertName | string | 'DipAvailability' | ||
metricAlertDimension1 | string | 'ProtocolType' | ||
metricAlertDimension2 | string | 'FrontendIPAddress' | ||
metricAlertDimension3 | string | 'BackendIPAddress' | ||
metricAlertDescription | string | 'Average Load Balancer health probe status per time duration' | ||
metricAlertSeverity | string | '2' | ||
metricAlertEnabled | string | 'true' | ||
metricAlertEvaluationFrequency | string | 'PT15M' | ||
metricAlertWindowSize | string |'PT1H' | ||
metricAlertSensitivity | string | 'Medium' | ||
metricAlertOperator | string | 'LessThan' | ||
metricAlertTimeAggregation | string | 'Average' | ||
metricAlertCriterionType | string | 'DynamicThresholdCriterion' | ||
metricAlertAutoMitigate | string | 'true' | ||
assignmentEnforcementMode | string | 'Default' | ||
----------------------------- | ||
|
||
Authored & Tested with: | ||
* azure-cli version 2.20.0 | ||
* [azure-cli](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) version 2.20.0 | ||
* bicep cli version 0.3.1 (d0f5c9b164) | ||
* bicep 0.3.1 vscode extension | ||
|
||
|
@@ -17,4 +49,5 @@ Example Deployment steps | |
az login | ||
az bicep build -f ./main.bicep | ||
az deployment sub create -f ./main.bicep -l australiaeast | ||
az policy state trigger-scan | ||
``` |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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