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
1. Select **Assign Policy** from the top of the **Policy - Assignments** page.
37
37
38
-

38
+
:::image type="content" source="./media/assign-policy-portal/select-assign-policy.png" alt-text="Assign a policy definition from Assignments page" border="false":::
39
39
40
40
1. On the **Assign Policy** page, select the **Scope** by clicking the ellipsis and selecting either
41
41
a management group or subscription. Optionally, select a resource group. A scope determines what
@@ -52,14 +52,14 @@ disks_ policy definition.
52
52
53
53
- Enforce tag and its value
54
54
- Apply tag and its value
55
-
-Require SQL Server version 12.0
55
+
-Inherit a tag from the resource group if missing
56
56
57
57
For a partial list of available built-in policies, see [Azure Policy samples](./samples/index.md).
58
58
59
59
1. Search through the policy definitions list to find the _Audit VMs that do not use managed disks_
60
60
definition. Click on that policy and click **Select**.
61
61
62
-

62
+
:::image type="content" source="./media/assign-policy-portal/select-available-definition.png" alt-text="Find the correct policy definition" border="false":::
63
63
64
64
1. The **Assignment name** is automatically populated with the policy name you selected, but you can
65
65
change it. For this example, leave _Audit VMs that do not use managed disks_. You can also add an
@@ -84,7 +84,7 @@ environment.
84
84
Select **Compliance** in the left side of the page. Then locate the **Audit VMs that do not use
85
85
managed disks** policy assignment you created.
86
86
87
-

87
+
:::image type="content" source="./media/assign-policy-portal/policy-compliance.png" alt-text="Compliance details on the Policy Compliance page" border="false":::
88
88
89
89
If there are any existing resources that aren't compliant with this new assignment, they appear
90
90
under **Non-compliant resources**.
@@ -116,7 +116,7 @@ To remove the assignment created, follow these steps:
116
116
1. Right-click the **Audit VMs that do not use managed disks** policy assignment and select **Delete
117
117
assignment**.
118
118
119
-

119
+
:::image type="content" source="./media/assign-policy-portal/delete-assignment.png" alt-text="Delete an assignment from the Compliance page" border="false":::
Copy file name to clipboardExpand all lines: articles/governance/policy/tutorials/create-and-manage.md
+29-27Lines changed: 29 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "Tutorial: Build policies to enforce compliance"
3
3
description: In this tutorial, you use policies to enforce standards, control costs, maintain security, and impose enterprise wide design principles.
4
-
ms.date: 12/20/2019
4
+
ms.date: 03/24/2020
5
5
ms.topic: tutorial
6
6
---
7
7
# Tutorial: Create and manage policies to enforce compliance
@@ -29,21 +29,22 @@ before you begin.
29
29
30
30
The first step in enforcing compliance with Azure Policy is to assign a policy definition. A policy
31
31
definition defines under what condition a policy is enforced and what effect to take. In this
32
-
example, assign a built-in policy definition, called *Require SQL Server version 12.0*, to enforce
33
-
the condition that all SQL Server databases must be v12.0 to be compliant.
32
+
example, assign the built-in policy definition called _Inherit a tag from the resource group if
33
+
missing_ to add the specified tag with its value from the parent resource group to new or updated
34
+
resources missing the tag.
34
35
35
36
1. Go to the Azure portal to assign policies. Search for and select **Policy**.
36
37
37
-

38
+
:::image type="content" source="../media/create-and-manage/search-policy.png" alt-text="Search for Policy in the search bar" border="false":::
38
39
39
40
1. Select **Assignments** on the left side of the Azure Policy page. An assignment is a policy that
40
41
has been assigned to take place within a specific scope.
41
42
42
-

43
+
:::image type="content" source="../media/create-and-manage/select-assignments.png" alt-text="Select Assignments from Policy Overview page" border="false":::
43
44
44
45
1. Select **Assign Policy** from the top of the **Policy - Assignments** page.
45
46
46
-

47
+
:::image type="content" source="../media/create-and-manage/select-assign-policy.png" alt-text="Assign a policy definition from Assignments page" border="false":::
47
48
48
49
1. On the **Assign Policy** page and **Basics** tab, select the **Scope** by selecting the ellipsis
49
50
and selecting either a management group or subscription. Optionally, select a resource group. A
@@ -56,18 +57,19 @@ the condition that all SQL Server databases must be v12.0 to be compliant.
56
57
the level of the **Scope**. **Exclusions** are optional, so leave it blank for now.
57
58
58
59
1. Select the **Policy definition** ellipsis to open the list of available definitions. You can
59
-
filter the policy definition **Type** to *Built-in* to view all and read their descriptions.
60
+
filter the policy definition **Type** to _Built-in_ to view all and read their descriptions.
60
61
61
-
1. Select **Add or replace a tag on resources**. If you can't find it right away, type **add or
62
-
replace**into the search box and then press ENTER or select out of the search box. Select
63
-
**Select** at the bottom of the **Available Definitions** page once you have found and selected
64
-
the policy definition.
62
+
1. Select **Inherit a tag from the resource group if missing**. If you can't find it right away,
63
+
type **inherit a tag**into the search box and then press ENTER or select out of the search box.
64
+
Select **Select** at the bottom of the **Available Definitions** page once you have found and
65
+
selected the policy definition.
65
66
66
-

67
+
:::image type="content" source="../media/create-and-manage/select-available-definition.png" alt-text="Use search filter to locate a policy":::
67
68
68
69
1. The **Assignment name** is automatically populated with the policy name you selected, but you can
69
-
change it. For this example, leave *Add or replace a tag on resources*. You can also add an optional
70
-
**Description**. The description provides details about this policy assignment.
70
+
change it. For this example, leave _Inherit a tag from the resource group if missing_. You can
71
+
also add an optional **Description**. The description provides details about this policy
72
+
assignment.
71
73
72
74
1. Leave **Policy enforcement** as _Enabled_. When _Disabled_, this setting allows testing the
73
75
outcome of the policy without triggering the effect. For more information, see
@@ -78,7 +80,7 @@ the condition that all SQL Server databases must be v12.0 to be compliant.
78
80
79
81
1. Select the **Parameters** tab at the top of the wizard.
80
82
81
-
1. For **Tag Name**, enter _Environment_ and for **Tag Value** enter _Dev_.
83
+
1. For **Tag Name**, enter _Environment_.
82
84
83
85
1. Select the **Remediation** tab at the top of the wizard.
84
86
@@ -106,7 +108,7 @@ series, the request is denied.
106
108
107
109
1. Select **Definitions** under **Authoring** in the left side of the Azure Policy page.
108
110
109
-

111
+
:::image type="content" source="../media/create-and-manage/definition-under-authoring.png" alt-text="Definition page under Authoring group" border="false":::
110
112
111
113
1. Select **+ Policy definition** at the top of the page. This button opens to the **Policy
112
114
definition** page.
@@ -386,12 +388,12 @@ overview](../overview.md).
386
388
387
389
1. Select **Definitions** under **Authoring** in the left side of the Azure Policy page.
388
390
389
-

391
+
:::image type="content" source="../media/create-and-manage/definition-under-authoring.png" alt-text="Select definition from the Definitions page" border="false":::
390
392
391
393
1. Select **+ Initiative Definition** at the top of the page to open the **Initiative definition**
1. Selecting any policy on the initiative compliance page opens the compliance details page for that
555
557
policy. This page provides details at the resource level for compliance.
@@ -571,14 +573,14 @@ select **Failed. Click here for details ->** on the Deployment Overview page. A
571
573
right side of the page with the error information. Under **Error Details** are the GUIDs of the
572
574
related policy objects.
573
575
574
-

576
+
:::image type="content" source="../media/create-and-manage/rg-deployment-denied.png" alt-text="Deployment denied by policy assignment" border="false":::
575
577
576
578
On the Azure Policy page: Select **Compliance** in the left side of the page and select the **Get
577
579
Secure** policy initiative. On this page, there is an increase in the **Deny** count for blocked
578
580
resources. Under the **Events** tab are details about who tried to create or deploy the resource
579
581
that was denied by the policy definition.
580
582
581
-

583
+
:::image type="content" source="../media/create-and-manage/compliance-overview.png" alt-text="Compliance overview of an assigned policy" border="false":::
582
584
583
585
In this example, Trent Baker, one of Contoso's Sr. Virtualization specialists, was doing required
584
586
work. We need to grant Trent a space for an exception. Created a new resource group,
@@ -593,7 +595,7 @@ work. We need to grant Trent a space for an exception. Created a new resource gr
593
595
1. Set the **Exclusion** by selecting the ellipsis and selecting the resource group to exclude,
594
596
_LocationsExcluded_ in this example. Select **Add to Selected Scope** and then select **Save**.
595
597
596
-

598
+
:::image type="content" source="../media/create-and-manage/request-exclusion.png" alt-text="Add an excluded resource group to the policy assignment" border="false":::
597
599
598
600
> [!NOTE]
599
601
> Depending on the policy definition and its effect, the exclusion could also be granted to
0 commit comments