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/azure-policy/create-manage-policy.md
+40-28Lines changed: 40 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Use Azure Policy to enforce standards, meet regulatory compliance a
4
4
services: azure-policy
5
5
author: DCtheGeek
6
6
ms.author: dacoulte
7
-
ms.date: 07/13/2018
7
+
ms.date: 08/22/2018
8
8
ms.topic: tutorial
9
9
ms.service: azure-policy
10
10
ms.custom: mvc
@@ -30,26 +30,26 @@ The first step in enforcing compliance with Azure Policy is to assign a policy d
30
30
31
31

32
32
33
-
2. Select **Assignments** on the left side of the Azure Policy page. An assignment is a policy that has been assigned to take place within a specific scope.
34
-
3. Select **Assign Policy** from the top of the **Policy - Assignments** page.
33
+
1. Select **Assignments** on the left side of the Azure Policy page. An assignment is a policy that has been assigned to take place within a specific scope.
34
+
1. Select **Assign Policy** from the top of the **Policy - Assignments** page.
35
35
36
36

37
37
38
-
4. On the **Assign Policy** page, select the **Scope** by clicking the ellipsis and selecting a subscription (required) and resource group (optional). A scope determines what resources or grouping of resources the policy assignment gets enforced on. Then click **Select** at the bottom of the **Scope** page.
38
+
1. On the **Assign Policy** page, select the **Scope** by clicking the ellipsis and selecting a subscription (required) and resource group (optional). A scope determines what resources or grouping of resources the policy assignment gets enforced on. Then click **Select** at the bottom of the **Scope** page.
39
39
40
40
This example uses the **Contoso Subscription**. Your subscription will differ.
41
41
42
-
5. If you wanted to exclude one or more resource groups (if you only scoped a subscription) or specific resources within a resource group (either scoping case), you could configure **Exclusions** from the policy assignment. Leave it blank for now.
42
+
1. If you wanted to exclude one or more resource groups (if you only scoped a subscription) or specific resources within a resource group (either scoping case), you could configure **Exclusions** from the policy assignment. Leave it blank for now.
43
43
44
-
6. Select the **Policy definition** ellipsis to open the list of available definitions. You can filter the policy definition **Type** to *Built-in* to view all and read their descriptions.
44
+
1. Select the **Policy definition** ellipsis to open the list of available definitions. You can filter the policy definition **Type** to *Built-in* to view all and read their descriptions.
45
45
46
-
7. Select **Require SQL Server version 12.0**. If you cannot find it right away, type **require sql server** into the search box and then press ENTER or click out of the search box. Click **Select** at the bottom of the **Available Definitions** page once you have found and selected the policy definition.
46
+
1. Select **Require SQL Server version 12.0**. If you cannot find it right away, type **require sql server** into the search box and then press ENTER or click out of the search box. Click **Select** at the bottom of the **Available Definitions** page once you have found and selected the policy definition.
47
47
48
48

49
49
50
-
8. The **Assignment name** is automatically populated with the policy name you selected, but you can change it. For this example, leave *Require SQL Server version 12.0*. You can also add an optional **Description**. The description provides details about this policy assignment.
50
+
1. The **Assignment name** is automatically populated with the policy name you selected, but you can change it. For this example, leave *Require SQL Server version 12.0*. You can also add an optional **Description**. The description provides details about this policy assignment.
51
51
52
-
9. Click **Assign**.
52
+
1. Click **Assign**.
53
53
54
54
## Implement a new custom policy
55
55
@@ -59,8 +59,8 @@ Now that you've assigned a built-in policy definition, you can do more with Azur
59
59
60
60

61
61
62
-
2. Select **+ Policy definition** at the top of the page. This opens to the **Policy definition** page.
63
-
3. Enter the following:
62
+
1. Select **+ Policy definition** at the top of the page. This opens to the **Policy definition** page.
63
+
1. Enter the following:
64
64
65
65
- The management group or subscription in which the policy definition is saved. Select by using the ellipsis on **Definition location**.
66
66
@@ -102,7 +102,7 @@ Now that you've assigned a built-in policy definition, you can do more with Azur
102
102
103
103
To view more Azure policy samples, see [Templates for Azure Policy](json-samples.md).
104
104
105
-
4. Select **Save**.
105
+
1. Select **Save**.
106
106
107
107
## Create a policy definition with REST API
108
108
@@ -241,7 +241,7 @@ Get-AzureRmPolicyDefinition
241
241
242
242
It returns all available policy definitions, including built-in policies. Each policy is returned in the following format:
3. Use the **Definition location** ellipsis to select a subscription to store the definition.
328
+
1. Use the **Definition location** ellipsis to select a management group or subscription to store the definition.
329
329
330
-
4. Enter the **Name** and **Description** of the initiative.
330
+
1. Enter the **Name** and **Description** of the initiative.
331
331
332
332
This example will ensure that resources are in compliance with policy definitions about getting secure. So, the name of the initiative would be **Get Secure** and the description would be: **This initiative has been created to handle all policy definitions associated with securing resources**.
333
333
334
-
5. For **Category**, choose from existing options or create a new category.
334
+
1. For **Category**, choose from existing options or create a new category.
335
335
336
-
6. Browse through the list of **Available Definitions** (right half of **Initiative definition** page) and select the policy definition(s) you would like to add to this initiative. For the **Get secure** initiative, add the following built-in policy definitions by clicking the **+** next to the policy definition information or clicking a policy definition row and then the **+ Add** option in the details page:
336
+
1. Browse through the list of **Available Definitions** (right half of **Initiative definition** page) and select the policy definition(s) you would like to add to this initiative. For the **Get secure** initiative, add the following built-in policy definitions by clicking the **+** next to the policy definition information or clicking a policy definition row and then the **+ Add** option in the details page:
337
337
- Require SQL Server version 12.0
338
338
-[Preview]: Monitor unprotected web applications in Security Center.
339
339
-[Preview]: Monitor permissive network across in Security Center.
@@ -344,28 +344,40 @@ With an initiative definition, you can group several policy definitions to achie
1. If a policy definition being added to the initiative has parameters, they are shown under the policy name in the **POLICIES AND PARAMETERS** area. The _value_ can be set to either 'Set value' (hard coded for all assignments of this initiative) or 'Use Initiative Parameter' (set during each initiative assignment). If 'Set value' is selected, the drown-down to the right of _Values_ allows entering or selecting the desired value(s). If 'Use Initiative Parameter' is selected, a new **Initiative parameters** section is displayed allowing you to define the parameter that will be set during initiative assignment. The allowed values on this initiative parameter can further restrict what may be set during initiative assignment.
> In the case of some `strongType` parameters, the list of values cannot be automatically
353
+
> determined. In these cases, an ellipsis will appear to the right of the parameter row. Clicking
354
+
> it will open the 'Parameter scope (<parameter name>)' page. On this page, select the
355
+
> subscription to use for providing the value options. This parameter scope is only used during
356
+
> creation of the initiative definition and has no impact on policy evaluation or the scope of
357
+
> the initiative when assigned.
358
+
359
+
1. Click **Save**.
348
360
349
361
### Assign an initiative definition
350
362
351
363
1. Select **Definitions** under **AUTHORING** in the left side of the Azure Policy page.
352
-
2. Locate the **Get Secure** initiative definition you previously created and select it.
353
-
3. Select **Assign** at the top of the page to open to the **Get Secure: Assign Initiative** page.
364
+
1. Locate the **Get Secure** initiative definition you previously created and select it.
365
+
1. Select **Assign** at the top of the page to open to the **Get Secure: Assign Initiative** page.
354
366
355
367

356
368
357
369
Alternatively, you can right-click on the selected row or left-click on the ellipsis at the end of the row for a contextual menu. Then select **Assign**.
358
370
359
371

360
372
361
-
4. Fill out the **Get Secure: Assign Initiative** page by entering the following example information. You can use your own information.
373
+
1. Fill out the **Get Secure: Assign Initiative** page by entering the following example information. You can use your own information.
362
374
363
375
- Scope: The subscription you saved the initiative to will be the default. You can change scope to assign the initiative to a resource group within the subscription save location.
364
376
- Exclusions: Configure any resources within the scope to prevent the initiative assignment from being applied to them.
365
377
- Initiative definition and Assignment name: Get Secure (pre-populated as name of initiative being assigned).
366
378
- Description: This initiative assignment is tailored to enforce this group of policy definitions.
367
379
368
-
5. Click **Assign**.
380
+
1. Click **Assign**.
369
381
370
382
## Exempt a non-compliant or denied resource using Exclusion
371
383
@@ -386,15 +398,15 @@ In this example, Trent Baker, one of Contoso's Sr. Virtualization specialists, w
386
398
### Update assignment with exclusion
387
399
388
400
1. Select **Assignments** under **AUTHORING** in the left side of the Azure Policy page.
389
-
2. Browse through all policy assignments and open the *Require SQL Server version 12.0* assignment.
390
-
3. Set the **Exclusion** by clicking the ellipsis and selecting the resource group to exclude, *SQLServers_Excluded* in this example.
401
+
1. Browse through all policy assignments and open the *Require SQL Server version 12.0* assignment.
402
+
1. Set the **Exclusion** by clicking the ellipsis and selecting the resource group to exclude, *SQLServers_Excluded* in this example.
> Depending on the policy and its effect, the exclusion could also be granted to specific resources within a resource group inside the scope of the assignment. As a **Deny** effect was used in this tutorial, it would not make sense to set the exclusion on a specific resource that already exists.
396
408
397
-
4. Click **Select** and then click **Save**.
409
+
1. Click **Select** and then click **Save**.
398
410
399
411
In this section, you resolved the denial of the attempt to create a prohibited version of SQL server by creating an exclusion on a single resource group.
400
412
@@ -403,8 +415,8 @@ In this section, you resolved the denial of the attempt to create a prohibited v
403
415
If you are done working with resources from this tutorial, use the following steps to delete any of the assignments or definitions created above:
404
416
405
417
1. Select **Definitions** (or **Assignments** if you are trying to delete an assignment) under **AUTHORING** in the left side of the Azure Policy page.
406
-
2. Search for the new initiative or policy definition (or assignment) you want to remove.
407
-
3. Right-click the row or select the ellipses at the end of the definition (or assignment), and select **Delete definition** (or **Delete assignment**).
418
+
1. Search for the new initiative or policy definition (or assignment) you want to remove.
419
+
1. Right-click the row or select the ellipses at the end of the definition (or assignment), and select **Delete definition** (or **Delete assignment**).
0 commit comments