|
1 | 1 | ---
|
2 | 2 | title: Azure Policies for Lab Services
|
3 |
| -description: This article describes the policies available for Azure Lab Services. |
| 3 | +description: Learn how to use Azure Policy to use built-in policies for Azure Lab Services to make sure your labs are compliant with your requirements. |
4 | 4 | ms.topic: conceptual
|
5 | 5 | ms.author: rosemalcolm
|
6 | 6 | author: RoseHJM
|
7 |
| -ms.date: 08/15/2022 |
| 7 | +ms.date: 11/08/2022 |
8 | 8 | ---
|
9 | 9 |
|
10 |
| -# What’s new with Azure Policy for Lab Services? |
| 10 | +# Use policies to audit and manage Azure Lab Services |
11 | 11 |
|
12 |
| -Azure Policy helps you manage and prevent IT issues by applying policy definitions that enforce rules and effects for your resource. Azure Lab Services has added four built-in Azure policies. This article summarizes the new policies available in the August 2022 Update for Azure Lab Services. |
| 12 | +When teams create and run labs on Azure Lab Services, they may face varying requirements to the configuration of resources. Administrators may look for options to control cost, provide customization through templates, or restrict user permissions. |
13 | 13 |
|
14 |
| -1. Lab Services should enable all options for auto shutdown |
15 |
| -1. Lab Services should not allow template virtual machines for labs |
16 |
| -1. Lab Services should require non-admin user for labs |
17 |
| -1. Lab Services should restrict allowed virtual machine SKU sizes |
| 14 | +As a platform administrator, you can use policies to lay out guardrails for teams to manage their own resources. [Azure Policy](../governance/policy/index.yml) helps audit and govern resource state. In this article, you learn about available auditing controls and governance practices for Azure Lab Services. |
18 | 15 |
|
19 |
| -For a full list of built-in policies, including policies for Lab Services, see [Azure Policy built-in policy definitions](../governance/policy/samples/built-in-policies.md#lab-services). |
| 16 | +[!INCLUDE [lab plans only note](./includes/lab-services-new-update-focused-article.md)] |
20 | 17 |
|
| 18 | +## Policies for Azure Lab Services |
21 | 19 |
|
| 20 | +[Azure Policy](../governance/policy/index.yml) is a governance tool that allows you to ensure that Azure resources are compliant with your policies. |
22 | 21 |
|
23 |
| -[!INCLUDE [lab plans only note](./includes/lab-services-new-update-focused-article.md)] |
| 22 | +Azure Lab Services provides a set of policies that you can use for common scenarios with Azure Lab Services. You can assign these policy definitions to your existing subscription or use them as the basis to create your own custom definitions. |
| 23 | + |
| 24 | +Policies can be set at different scopes, such as at the subscription or resource group level. For more information, see the [Azure Policy documentation](../governance/policy/overview.md). |
| 25 | + |
| 26 | +For a full list of built-in policies, including policies for Lab Services, see Azure Policy built-in policy definitions. |
24 | 27 |
|
25 |
| -## Lab Services should enable all options for auto shutdown |
| 28 | +### Lab Services should enable all options for auto shutdown |
26 | 29 |
|
27 |
| -This policy enforces that all [shutdown options](how-to-configure-auto-shutdown-lab-plans.md) are enabled while creating the lab. During policy assignment, lab administrators can choose the following effects. |
| 30 | +This policy enforces that all [shutdown options](how-to-configure-auto-shutdown-lab-plans.md) are enabled while creating the lab. |
| 31 | + |
| 32 | +During policy assignment, lab administrators can choose the following effects: |
28 | 33 |
|
29 | 34 | |**Effect**|**Behavior**|
|
30 |
| -|-----|-----| |
31 |
| -|**Audit**|Labs will show on the [compliance dashboard](../governance/policy/assign-policy-portal.md#identify-non-compliant-resources) as non-compliant when all shutdown options are not enabled for a lab. | |
32 |
| -|**Deny**|Lab creation will fail if all shutdown options are not enabled. | |
| 35 | +|----------|------------| |
| 36 | +|**Audit** | Labs will show on the [compliance dashboard](../governance/policy/assign-policy-portal.md#identify-non-compliant-resources) as non-compliant when all shutdown options aren't enabled for a lab. | |
| 37 | +|**Deny** | Lab creation will fail if all shutdown options aren't enabled. | |
| 38 | + |
| 39 | +### Lab Services should not allow template virtual machines for labs |
33 | 40 |
|
34 |
| -## Lab Services should not allow template virtual machines for labs |
| 41 | +You can use this policy to restrict [customization of lab templates](tutorial-setup-lab.md). When you create a new lab, you can choose to *Create a template virtual machine* or *Use virtual machine image without customization*. If this policy is enabled, only *Use virtual machine image without customization* is allowed. |
35 | 42 |
|
36 |
| -This policy can be used to restrict [customization of lab templates](tutorial-setup-lab.md). When you create a new lab, you can select to *Create a template virtual machine* or *Use virtual machine image without customization*. If this policy is enabled, only *Use virtual machine image without customization* is allowed. During policy assignment, lab administrators can choose the following effects. |
| 43 | +During policy assignment, lab administrators can choose the following effects: |
37 | 44 |
|
38 | 45 | |**Effect**|**Behavior**|
|
39 |
| -|-----|-----| |
40 |
| -|**Audit**|Labs will show on the [compliance dashboard](../governance/policy/assign-policy-portal.md#identify-non-compliant-resources) as non-compliant when a template virtual machine is used for a lab.| |
41 |
| -|**Deny**|Lab creation to fail if “create a template virtual machine” option is used for a lab.| |
| 46 | +|----------|------------| |
| 47 | +|**Audit** |Labs will show on the [compliance dashboard](../governance/policy/assign-policy-portal.md#identify-non-compliant-resources) as non-compliant when a template virtual machine is used for a lab.| |
| 48 | +|**Deny** |Lab creation will fail if *Create a template virtual machine* option is used for a lab.| |
42 | 49 |
|
43 |
| -## Lab Services requires non-admin user for labs |
| 50 | +### Lab Services requires non-admin user for labs |
44 | 51 |
|
45 |
| -This policy is used to enforce using non-admin accounts while creating a lab. With the August 2022 Update, you can choose to add a non-admin account to the VM image. This new feature allows you to keep separate credentials for VM admin and non-admin users. For more information to create a lab with a non-admin user, see [Tutorial: Create and publish a lab](tutorial-setup-lab.md#create-a-lab), which shows how to give a student non-administrator account rather than default administrator account on the “Virtual machine credentials” page of the new lab wizard. |
| 52 | +Use this policy to enforce using non-admin accounts while creating a lab. With the August 2022 Update, you can choose to add a non-admin account to the VM image. This new feature allows you to keep separate credentials for VM admin and non-admin users. For more information to create a lab with a non-admin user, see [Tutorial: Create and publish a lab](tutorial-setup-lab.md#create-a-lab). The tutorial shows how to give a student a non-administrator account rather than default administrator account on the **Virtual machine credentials** page in the new lab wizard. |
46 | 53 |
|
47 |
| -During the policy assignment, the lab administrator can choose the following effects. |
| 54 | +During the policy assignment, the lab administrator can choose the following effects: |
48 | 55 |
|
49 | 56 | |**Effect**|**Behavior**|
|
50 |
| -|-----|-----| |
51 |
| -|**Audit**|Labs show on the [compliance dashboard](../governance/policy/assign-policy-portal.md#identify-non-compliant-resources) as non-compliant when non-admin accounts are not used while creating the lab.| |
52 |
| -|**Deny**|Lab creation will fail if “Give lab users a non-admin account on their virtual machines” is not checked while creating a lab.| |
| 57 | +|----------|------------| |
| 58 | +|**Audit** |Labs show on the [compliance dashboard](../governance/policy/assign-policy-portal.md#identify-non-compliant-resources) as non-compliant when non-admin accounts aren't used while creating the lab.| |
| 59 | +|**Deny** |Lab creation will fail if *Give lab users a non-admin account on their virtual machines* isn't checked while creating a lab.| |
| 60 | + |
| 61 | +### Lab Services should restrict allowed virtual machine SKU sizes |
53 | 62 |
|
54 |
| -## Lab Services should restrict allowed virtual machine SKU sizes |
55 |
| -This policy is used to enforce which SKUs can be used while creating the lab. For example, a lab administrator might want to prevent educators from creating labs with GPU SKUs since they are not needed for any classes being taught. This policy would allow lab administrators to enforce which SKUs can be used while creating the lab. |
56 |
| -During the policy assignment, the Lab Administrator can choose the following effects. |
| 63 | +This policy enforces which SKUs can be used while creating a lab. For example, a lab administrator might want to prevent educators from creating labs with GPU SKUs, since they aren't needed for any classes being taught. |
| 64 | + |
| 65 | +During the policy assignment, the Lab Administrator can choose the following effects: |
57 | 66 |
|
58 | 67 | |**Effect**|**Behavior**|
|
59 |
| -|-----|-----| |
60 |
| -|**Audit**|Labs show on the [compliance dashboard](../governance/policy/assign-policy-portal.md#identify-non-compliant-resources) as non-compliant when a non-allowed SKU is used while creating the lab.| |
61 |
| -|**Deny**|Lab creation will fail if SKU chosen while creating a lab is not allowed as per the policy assignment.| |
| 68 | +|----------|------------| |
| 69 | +|**Audit** |Labs show on the [compliance dashboard](../governance/policy/assign-policy-portal.md#identify-non-compliant-resources) as non-compliant when a non-allowed SKU is used while creating the lab.| |
| 70 | +|**Deny** |Lab creation will fail if the selected SKU while creating a lab isn't allowed as per the policy assignment.| |
| 71 | + |
| 72 | +## Assigning built-in policies |
| 73 | + |
| 74 | +To view the built-in policy definitions related to Azure Lab Services, use the following steps: |
| 75 | + |
| 76 | +1. Go to **Azure Policy** in the [Azure portal](https://portal.azure.com). |
| 77 | +1. Select **Definitions**. |
| 78 | +1. For **Type**, select *Built-in*, and for **Category**, select **Lab Services**. |
| 79 | + |
| 80 | +From here, you can select policy definitions to view them. While viewing a definition, you can use the **Assign** link to assign the policy to a specific scope, and configure the parameters for the policy. For more information, see [Assign a policy - portal](../governance/policy/assign-policy-portal.md). |
| 81 | + |
| 82 | +You can also assign policies by using [Azure PowerShell](../governance/policy/assign-policy-powershell.md), [Azure CLI](../governance/policy/assign-policy-azurecli.md), and [templates](../governance/policy/assign-policy-template.md). |
62 | 83 |
|
63 | 84 | ## Custom policies
|
64 | 85 |
|
65 |
| -In addition to the new built-in policies described above, you can create and apply custom policies. This technique is helpful in situations where none of the built-in policies apply or where you need more granularity. |
| 86 | +In addition to the new built-in policies described above, you can create and apply custom policies. This technique is helpful in situations where none of the built-in policies apply or where you need more granularity. |
66 | 87 |
|
67 | 88 | Learn how to create custom policies:
|
68 | 89 | - [Tutorial: Create and manage policies to enforce compliance](../governance/policy/tutorials/create-and-manage.md).
|
69 | 90 | - [Tutorial: Create a custom policy definition](../governance/policy/tutorials/create-custom-policy-definition.md).
|
70 | 91 |
|
71 | 92 | ## Next steps
|
72 | 93 |
|
73 |
| -See the following articles: |
74 | 94 | - [How to use the Lab Services should restrict allowed virtual machine SKU sizes Azure policy](how-to-use-restrict-allowed-virtual-machine-sku-sizes-policy.md)
|
75 |
| -- [Built-in Policies](../governance/policy/samples/built-in-policies.md#lab-services) |
| 95 | +- [Built-in policies for Azure Lab Services](./policy-reference.md) |
76 | 96 | - [What is Azure policy?](../governance/policy/overview.md)
|
0 commit comments