You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/governance/policy/assign-policy-portal.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ In this quickstart, you create a policy assignment with a built-in policy defini
58
58
| Tab name | Options |
59
59
| ---- | ---- |
60
60
|**Parameters**| If the policy definition you selected on the **Basics** tab has parameters, you configure them on the **Parameters** tab. This example doesn't use parameters. |
61
-
|**Remediation**| You can create a managed identity. For this example, **Create a Managed Identity** is unchecked. <br><br> This box _must_ be checked when a policy or initiative includes a policy with either the [deployIfNotExists](./concepts/effects.md#deployifnotexists) or [modify](./concepts/effects.md#modify) effect. For more information, go to [managed identities](../../active-directory/managed-identities-azure-resources/overview.md) and [how remediation access control works](./how-to/remediate-resources.md#how-remediation-access-control-works). |
61
+
|**Remediation**| You can create a managed identity. For this example, **Create a Managed Identity** is unchecked. <br><br> This box _must_ be checked when a policy or initiative includes a policy with either the [deployIfNotExists](./concepts/effect-deploy-if-not-exists.md) or [modify](./concepts/effect-modify.md) effect. For more information, go to [managed identities](../../active-directory/managed-identities-azure-resources/overview.md) and [how remediation access control works](./how-to/remediate-resources.md#how-remediation-access-control-works). |
62
62
63
63
1. Select **Next** and on the **Non-compliance messages** tab create a **Non-compliance message** like _Virtual machines should use managed disks_.
Copy file name to clipboardExpand all lines: articles/governance/policy/concepts/assignment-structure.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -275,7 +275,7 @@ One override can be used to replace the effect of many policies by specifying mu
275
275
276
276
The `enforcementMode` property provides customers the ability to test the outcome of a policy on existing resources without initiating the policy effect or triggering entries in the [Azure Activity log](/azure/azure-monitor/essentials/platform-logs-overview).
277
277
278
-
This scenario is commonly referred to as _What If_ and aligns to safe deployment practices. `enforcementMode` is different from the [Disabled](./effects.md#disabled) effect, as that effect prevents resource evaluation from happening at all.
278
+
This scenario is commonly referred to as _What If_ and aligns to safe deployment practices. `enforcementMode` is different from the [Disabled](./effect-disabled.md) effect, as that effect prevents resource evaluation from happening at all.
279
279
280
280
This property has the following values:
281
281
@@ -284,7 +284,7 @@ This property has the following values:
284
284
|Enabled |Default |string |Yes |Yes |The policy effect is enforced during resource creation or update. |
285
285
|Disabled |DoNotEnforce |string |Yes |No | The policy effect isn't enforced during resource creation or update. |
286
286
287
-
If `enforcementMode` isn't specified in a policy or initiative definition, the value _Default_ is used. [Remediation tasks](../how-to/remediate-resources.md) can be started for [deployIfNotExists](./effects.md#deployifnotexists) policies, even when `enforcementMode` is set to _DoNotEnforce_.
287
+
If `enforcementMode` isn't specified in a policy or initiative definition, the value _Default_ is used. [Remediation tasks](../how-to/remediate-resources.md) can be started for [deployIfNotExists](./effect-deploy-if-not-exists.md) policies, even when `enforcementMode` is set to _DoNotEnforce_.
Copy file name to clipboardExpand all lines: articles/governance/policy/concepts/definition-structure-alias.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ The list of aliases is always growing. To find which aliases Azure Policy suppor
30
30
```
31
31
32
32
> [!NOTE]
33
-
> To find aliases that can be used with the [modify](./effects.md#modify) effect, use the
33
+
> To find aliases that can be used with the [modify](./effect-modify.md) effect, use the
34
34
> following command in Azure PowerShell **4.6.0** or higher:
35
35
>
36
36
> ```azurepowershell-interactive
@@ -83,7 +83,7 @@ For more information and examples, see [Referencing array resource properties](.
83
83
- For more information about policy definition structure, go to [basics](./definition-structure-basics.md), [parameters](./definition-structure-parameters.md), and [policy rule](./definition-structure-policy-rule.md).
84
84
- For initiatives, go to [initiative definition structure](./initiative-definition-structure.md).
85
85
- Review examples at [Azure Policy samples](../samples/index.md).
Copy file name to clipboardExpand all lines: articles/governance/policy/concepts/definition-structure-parameters.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -193,7 +193,7 @@ The non _resource type_ allowed values for `strongType` are:
193
193
- For more information about policy definition structure, go to [basics](./definition-structure-basics.md), [policy rule](./definition-structure-policy-rule.md), and [alias](./definition-structure-alias.md).
194
194
- For initiatives, go to [initiative definition structure](./initiative-definition-structure.md).
195
195
- Review examples at [Azure Policy samples](../samples/index.md).
Copy file name to clipboardExpand all lines: articles/governance/policy/concepts/definition-structure-policy-rule.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -633,7 +633,7 @@ The following functions are only available in policy rules:
633
633
-`field(fieldName)`
634
634
-`fieldName`: [Required] string - Name of the [field](./definition-structure-policy-rule.md#fields) to retrieve
635
635
- Returns the value of that field from the resource that is being evaluated by the If condition.
636
-
-`field` is primarily used with `auditIfNotExists` and `deployIfNotExists` to reference fields on the resource that are being evaluated. An example of this use can be seen in the [DeployIfNotExists example](effects.md#deployifnotexists-example).
636
+
-`field` is primarily used with `auditIfNotExists` and `deployIfNotExists` to reference fields on the resource that are being evaluated. An example of this use can be seen in the [DeployIfNotExists example](effect-deploy-if-not-exists.md#deployifnotexists-example).
637
637
638
638
-`requestContext().apiVersion`
639
639
- Returns the API version of the request that triggered policy evaluation (example: `2021-09-01`). This value is the API version that was used in the PUT/PATCH request for evaluations on resource creation/update. The latest API version is always used during compliance evaluation on existing resources.
@@ -727,7 +727,7 @@ The length of the string created by the `concat()` function depends on the value
727
727
- For more information about policy definition structure, go to [basics](./definition-structure-basics.md), [parameters](./definition-structure-parameters.md), and [alias](./definition-structure-alias.md).
728
728
- For initiatives, go to [initiative definition structure](./initiative-definition-structure.md).
729
729
- Review examples at [Azure Policy samples](../samples/index.md).
The `addToNetworkGroup` effect 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.
10
+
The `addToNetworkGroup` effect 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-basics.md#resource-provider-modes) definitions only.
11
11
12
12
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.
Copy file name to clipboardExpand all lines: articles/governance/policy/concepts/effect-basics.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ The following list is some general guidance around interchangeable effects:
36
36
37
37
## Order of evaluation
38
38
39
-
Azure Policy's first evaluation is for requests to create or update a resource. Azure Policy creates a list of all assignments that apply to the resource and then evaluates the resource against each definition. For a [Resource Manager mode](./definition-structure.md#resource-manager-modes), Azure Policy processes several of the effects before handing the request to the appropriate Resource Provider. This order prevents unnecessary processing by a Resource Provider when a resource doesn't meet the designed governance controls of Azure Policy. With a [Resource Provider mode](./definition-structure.md#resource-provider-modes), the Resource Provider manages the evaluation and outcome and reports the results back to Azure Policy.
39
+
Azure Policy's first evaluation is for requests to create or update a resource. Azure Policy creates a list of all assignments that apply to the resource and then evaluates the resource against each definition. For a [Resource Manager mode](./definition-structure-basics.md#resource-manager-modes), Azure Policy processes several of the effects before handing the request to the appropriate Resource Provider. This order prevents unnecessary processing by a Resource Provider when a resource doesn't meet the designed governance controls of Azure Policy. With a [Resource Provider mode](./definition-structure-basics.md#resource-provider-modes), the Resource Provider manages the evaluation and outcome and reports the results back to Azure Policy.
40
40
41
41
-`disabled` is checked first to determine whether the policy rule should be evaluated.
42
42
-`append` and `modify` are then evaluated. Since either could alter the request, a change made might prevent an audit or deny effect from triggering. These effects are only available with a Resource Manager mode.
Copy file name to clipboardExpand all lines: articles/governance/policy/concepts/effect-modify.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,13 @@ ms.topic: conceptual
7
7
8
8
# Azure Policy definitions modify effect
9
9
10
-
The `modify` effect is used to add, update, or remove properties or tags on a subscription or resource during creation or update. Existing non-compliant resources can also be remediated with a [remediation task](../how-to/remediate-resources.md). Policy assignments with effect set as Modify require a [managed identity](../how-to/remediate-resources.md) to do remediation. A common example using `modify` effect is updating tags on resources such as 'costCenter'.
10
+
The `modify` effect is used to add, update, or remove properties or tags on a subscription or resource during creation or update. Existing non-compliant resources can also be remediated with a [remediation task](../how-to/remediate-resources.md). Policy assignments with effect set as Modify require a [managed identity](../how-to/remediate-resources.md) to do remediation. A common example using `modify` effect is updating tags on resources such as 'costCenter'.
11
11
12
12
There are some nuances in modification behavior for resource properties. Learn more about scenarios when modification is [skipped](#skipped-modification).
13
13
14
14
A single `modify` rule can have any number of operations. Supported operations are:
15
15
16
-
-_Add_, _replace_, or _remove_ resource tags. Only tags can be removed. For tags, a Modify policy should have [mode](./definition-structure.md#resource-manager-modes) set to `indexed` unless the target resource is a resource group.
16
+
-_Add_, _replace_, or _remove_ resource tags. Only tags can be removed. For tags, a Modify policy should have [mode](./definition-structure-basics.md#resource-manager-modes) set to `indexed` unless the target resource is a resource group.
17
17
-_Add_ or _replace_ the value of managed identity type (`identity.type`) of virtual machines and Virtual Machine Scale Sets. You can only modify the `identity.type` for virtual machines or Virtual Machine Scale Sets.
18
18
-_Add_ or _replace_ the values of certain aliases.
19
19
- Use `Get-AzPolicyAlias | Select-Object -ExpandProperty 'Aliases' | Where-Object { $_.DefaultMetadata.Attributes -eq 'Modifiable' }` in Azure PowerShell **4.6.0** or higher to get a list of aliases that can be used with `modify`.
@@ -26,7 +26,7 @@ A single `modify` rule can have any number of operations. Supported operations a
26
26
27
27
## Modify evaluation
28
28
29
-
Modify evaluates before the request gets processed by a Resource Provider during the creation or updating of a resource. The `modify` operations are applied to the request content when the `if` condition of the policy rule is met. Each `modify` operation can specify a condition that determines when it's applied.
29
+
Modify evaluates before the request gets processed by a Resource Provider during the creation or updating of a resource. The `modify` operations are applied to the request content when the `if` condition of the policy rule is met. Each `modify` operation can specify a condition that determines when it's applied.
30
30
31
31
When an alias is specified, more checks are performed to ensure that the `modify` operation doesn't change the request content in a way that causes the resource provider to reject it:
32
32
@@ -55,7 +55,7 @@ Modification of resource properties depends on the API request and the updated r
55
55
56
56
Imagine you apply a policy that modifies tags on a virtual machine (VM). Every time the VM is updated, such as during resizing or disk changes, the tags are updated accordingly regardless of the contents of the VM payload. This is because tags are independent of the VM properties.
57
57
58
-
However, if you apply a policy that modifies properties on a VM, modification is dependent on the resource payload. If you attempt to modify properties that are not included in the update payload, the modification will not take place. For instance, this can happen when patching the `assessmentMode` property of a VM (alias `Microsoft.Compute/virtualMachines/osProfile.windowsConfiguration.patchSettings.assessmentMode`). The property is "nested", so if its parent properties are not included in the request, this omission is assumed to be intentional and modification is skipped. For modification to take place, the resource payload should contain this context.
58
+
However, if you apply a policy that modifies properties on a VM, modification is dependent on the resource payload. If you attempt to modify properties that are not included in the update payload, the modification will not take place. For instance, this can happen when patching the `assessmentMode` property of a VM (alias `Microsoft.Compute/virtualMachines/osProfile.windowsConfiguration.patchSettings.assessmentMode`). The property is "nested", so if its parent properties are not included in the request, this omission is assumed to be intentional and modification is skipped. For modification to take place, the resource payload should contain this context.
59
59
60
60
## Modify properties
61
61
@@ -75,7 +75,7 @@ The `details` property of the `modify` effect has all the subproperties that def
75
75
- An array of all tag operations to be completed on matching resources.
76
76
- Properties:
77
77
-`operation` (required)
78
-
- Defines what action to take on a matching resource. Options are: `addOrReplace`, `Add`, and `Remove`.
78
+
- Defines what action to take on a matching resource. Options are: `addOrReplace`, `Add`, and `Remove`.
79
79
-`Add` behaves similar to the [append](./effect-append.md) effect.
80
80
-`Remove` is only supported for resource tags.
81
81
-`field` (required)
@@ -84,7 +84,7 @@ The `details` property of the `modify` effect has all the subproperties that def
84
84
- The value to set the tag to.
85
85
- This property is required if `operation` is _addOrReplace_ or _Add_.
86
86
-`condition` (optional)
87
-
- A string containing an Azure Policy language expression with [Policy functions](./definition-structure.md#policy-functions) that evaluates to _true_ or _false_.
87
+
- A string containing an Azure Policy language expression with [Policy functions](./definition-structure-policy-rule.md#policy-functions) that evaluates to _true_ or _false_.
88
88
- Doesn't support the following Policy functions: `field()`, `resourceGroup()`,
89
89
`subscription()`.
90
90
@@ -202,4 +202,4 @@ Example 3: Ensure that a storage account doesn't allow blob public access, the `
202
202
- Understand how to [programmatically create policies](../how-to/programmatically-create.md).
203
203
- Learn how to [get compliance data](../how-to/get-compliance-data.md).
204
204
- Learn how to [remediate non-compliant resources](../how-to/remediate-resources.md).
Mutation is used in Azure Policy for Kubernetes to remediate Azure Kubernetes Service (AKS) cluster components, like pods. This effect is specific to _Microsoft.Kubernetes.Data_[policy mode](./definition-structure.md#resource-provider-modes) definitions only.
10
+
Mutation is used in Azure Policy for Kubernetes to remediate Azure Kubernetes Service (AKS) cluster components, like pods. This effect is specific to _Microsoft.Kubernetes.Data_[policy mode](./definition-structure-basics.md#resource-provider-modes) definitions only.
11
11
12
12
To learn more, go to [Understand Azure Policy for Kubernetes clusters](./policy-for-kubernetes.md).
0 commit comments