Skip to content

Commit 486bf26

Browse files
Merge pull request #247348 from nehakulkarni123/nehakulkarni123-patch-1-2
Mutation Public Preview Changes
2 parents a6b06d0 + 26c84fd commit 486bf26

File tree

2 files changed

+144
-116
lines changed

2 files changed

+144
-116
lines changed

articles/governance/policy/concepts/effects.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ resource, an updated resource, or an existing resource.
1515

1616
These effects are currently supported in a policy definition:
1717

18+
- [AddToNetworkGroup](#addtonetworkgroup)
1819
- [Append](#append)
1920
- [Audit](#audit)
2021
- [AuditIfNotExists](#auditifnotexists)
@@ -24,6 +25,7 @@ These effects are currently supported in a policy definition:
2425
- [Disabled](#disabled)
2526
- [Manual](#manual)
2627
- [Modify](#modify)
28+
- [Mutate](#mutate-preview)
2729

2830
## Interchanging effects
2931

@@ -48,7 +50,7 @@ manages the evaluation and outcome and reports the results back to Azure Policy.
4850

4951
- **Disabled** is checked first to determine whether the policy rule should be evaluated.
5052
- **Append** and **Modify** are then evaluated. Since either could alter the request, a change made
51-
may prevent an audit or deny effect from triggering. These effects are only available with a
53+
might prevent an audit or deny effect from triggering. These effects are only available with a
5254
Resource Manager mode.
5355
- **Deny** is then evaluated. By evaluating deny before audit, double logging of an undesired
5456
resource is prevented.
@@ -64,6 +66,14 @@ logging or action is required.
6466
`PATCH` requests that only modify `tags` related fields restricts policy evaluation to
6567
policies containing conditions that inspect `tags` related fields.
6668

69+
## AddToNetworkGroup
70+
71+
AddToNetworkGroup is used in Azure Virtual Network Manager to define dynamic network group membership. This effect is specific to _Microsoft.Network.Data_ [policy mode](./definition-structure.md#resource-provider-modes) definitions only.
72+
73+
With network groups, your policy definition includes your conditional expression for matching virtual networks meeting your criteria, and specifies the destination network group where any matching resources are placed. The addToNetworkGroup effect is used to place resources in the destination network group.
74+
75+
To learn more, go to [Configuring Azure Policy with network groups in Azure Virtual Network Manager](../../../virtual-network-manager/concept-azure-policy-integration.md).
76+
6777
## Append
6878

6979
Append is used to add more fields to the requested resource during creation or update. A
@@ -312,7 +322,7 @@ related resources to match.
312322
complete, regardless of outcome. If provisioning takes longer than 6 hours, it's treated as a
313323
failure when determining _AfterProvisioning_ evaluation delays.
314324
- Default is `PT10M` (10 minutes).
315-
- Specifying a long evaluation delay may cause the recorded compliance state of the resource to
325+
- Specifying a long evaluation delay might cause the recorded compliance state of the resource to
316326
not update until the next
317327
[evaluation trigger](../how-to/get-compliance-data.md#evaluation-triggers).
318328
- **ExistenceCondition** (optional)
@@ -616,7 +626,7 @@ related resources to match and the template deployment to execute.
616626
complete, regardless of outcome. If provisioning takes longer than 6 hours, it's treated as a
617627
failure when determining _AfterProvisioning_ evaluation delays.
618628
- Default is `PT10M` (10 minutes).
619-
- Specifying a long evaluation delay may cause the recorded compliance state of the resource to
629+
- Specifying a long evaluation delay might cause the recorded compliance state of the resource to
620630
not update until the next
621631
[evaluation trigger](../how-to/get-compliance-data.md#evaluation-triggers).
622632
- **ExistenceCondition** (optional)
@@ -991,10 +1001,26 @@ is applied only when evaluating requests with API version greater or equals to `
9911001
}
9921002
}
9931003
```
1004+
## Mutate (preview)
1005+
1006+
Mutation is used in Azure Policy for Kubernetes to remediate AKS cluster components, like pods. This effect is specific to _Microsoft.Kubernetes.Data_ [policy mode](./definition-structure.md#resource-provider-modes) definitions only.
1007+
1008+
To learn more, go to [Understand Azure Policy for Kubernetes clusters](./policy-for-kubernetes.md).
1009+
1010+
### Mutate properties
1011+
- **mutationInfo** (optional)
1012+
- Can't be used with `constraint`, `constraintTemplate`, `apiGroups`, or `kinds`.
1013+
- Cannot be parameterized.
1014+
- **sourceType** (required)
1015+
- Defines the type of source for the constraint. Allowed values: _PublicURL_ or _Base64Encoded_.
1016+
- If _PublicURL_, paired with property `url` to provide location of the mutation template. The location must be publicly accessible.
1017+
> [!WARNING]
1018+
> Don't use SAS URIs or tokens in `url` or anything else that could expose a secret.
1019+
9941020

9951021
## Layering policy definitions
9961022

997-
A resource may be affected by several assignments. These assignments may be at the same scope or at
1023+
A resource can be affected by several assignments. These assignments might be at the same scope or at
9981024
different scopes. Each of these assignments is also likely to have a different effect defined. The
9991025
condition and effect for each policy is independently evaluated. For example:
10001026

0 commit comments

Comments
 (0)