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/ai-foundry/model-inference/how-to/configure-deployment-policies.md
+91-21Lines changed: 91 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,18 @@
1
1
---
2
-
title: Control AI model deployment with custom policies
2
+
title: Control model deployment with custom policies
3
3
titleSuffix: Azure AI Foundry
4
4
description: "Learn how to use custom Azure Policies to control Azure AI services and Azure OpenAI model deployment with Azure AI Foundry."
5
-
author: Blackmist
6
-
ms.author: larryfr
5
+
manager: nitinme
6
+
author: santiagxf
7
+
ms.author: fasantia
7
8
ms.service: azure-ai-foundry
8
9
ms.topic: how-to #Don't change
9
-
ms.date: 10/25/2024
10
-
11
-
#customer intent: As an admin, I want control what Azure AI services and Azure OpenAI models can be deployed by my developers.
12
-
10
+
ms.date: 2/05/2025
13
11
---
14
12
15
-
# Control AI model deployment with custom policies in Azure AI Foundry portal
13
+
# Control model deployment with custom policies
16
14
17
-
When using models from Azure AI services and Azure OpenAI with Azure AI Foundry, you might need to use custom policies to control what models your developers can deploy. Custom Azure Policies allow you to create policy definitions that meet your organization's unique requirements. This article shows you how to create and assign an example custom policy to control model deployment.
15
+
When using models from Azure AI Services and Azure OpenAI with Azure AI Foundry, you might need to use custom policies to control which [type of deployment](../concepts/deployment-types.md) options are available to them or which specific models users can deploy. This article guides you on how to create policies to control model deployments using Azure Policies.
18
16
19
17
## Prerequisites
20
18
@@ -24,9 +22,17 @@ When using models from Azure AI services and Azure OpenAI with Azure AI Foundry,
24
22
25
23
## Create a custom policy
26
24
25
+
Select the scenario better applies to your case:
26
+
27
+
# [Enforce specific models](#tab/models)
28
+
29
+
Follow these steps to create and assign an example custom policy to allow specific models from the model catalog.
30
+
27
31
1. From the [Azure portal](https://portal.azure.com), select **Policy** from the left side of the page. You can also search for **Policy** in the search bar at the top of the page.
28
-
1. From the left side of the Azure Policy Dashboard, select **Authoring**, **Definitions**, and then select **+ Policy definition** from the top of the page.
29
-
1. In the **Policy Definition** form, use the following values:
32
+
33
+
2. From the left side of the Azure Policy Dashboard, select **Authoring**, **Definitions**, and then select **+ Policy definition** from the top of the page.
34
+
35
+
3. In the **Policy Definition** form, use the following values:
30
36
31
37
-**Definition location**: Select the subscription or management group where you want to store the policy definition.
32
38
-**Name**: Enter a unique name for the policy definition. For example, `Custom allowed Azure AI services and Azure OpenAI models`.
@@ -71,24 +77,90 @@ When using models from Azure AI services and Azure OpenAI with Azure AI Foundry,
71
77
}
72
78
```
73
79
74
-
1. Select **Save** to save the policy definition. After saving, you arrive at the policy definition's overview page.
75
-
1. From the policy definition's overview page, select **Assign policy** to assign the policy definition.
76
-
1. From the **Assign policy** page, use the following values on the **Basics** tab:
80
+
4. Select **Save** to save the policy definition. After saving, you arrive at the policy definition's overview page.
81
+
82
+
5. From the policy definition's overview page, select **Assign policy** to assign the policy definition.
83
+
84
+
6. From the **Assign policy** page, use the following values on the **Basics** tab:
77
85
78
86
- **Scope**: Select the scope where you want to assign the policy. The scope can be a management group, subscription, or resource group.
79
87
- **Policy definition**: This field is prepopulated with the title of policy definition you created previously.
80
88
- **Assignment name**: Enter a unique name for the assignment.
81
89
- **Policy enforcement**: Make sure that the **Policy enforcement** field is set to **Enabled**. If it isn't enabled, the policy isn't enforced.
82
90
83
91
Select **Next** at the bottom of the page, or the **Parameters** tab at the top of the page.
84
-
1. From the **Parameters** tab, set **Allowed AI models** to the list of models that you want to allow. The list should be a comma-separated list of model names and approved versions, surrounded by square brackets. For example, `["gpt-4,0613", "gpt-35-turbo,0613"]`.
92
+
93
+
7. From the **Parameters** tab, set **Allowed AI models** to the list of models that you want to allow. The list should be a comma-separated list of model names and approved versions, surrounded by square brackets. For example, `["gpt-4,0613", "gpt-35-turbo,0613"]`.
85
94
86
95
> [!TIP]
87
96
> You can find the model names and their versions in the [Azure AI Foundry Model Catalog](https://ai.azure.com/explore/models). Select the model to view the details, and then copy the model name and their version in the title.
88
97
89
-
1. Optionally, select the **Non-compliance messages** tab at the top of the page and set a custom message for noncompliance.
90
-
1. Select **Review + create** tab and verify that the policy assignment is correct. When ready, select **Create** to assign the policy.
91
-
1. Notify your developers that the policy is in place. They receive an error message if they try to deploy a model that isn't in the list of allowed models.
98
+
8. Optionally, select the **Non-compliance messages** tab at the top of the page and set a custom message for noncompliance.
99
+
100
+
9. Select **Review + create** tab and verify that the policy assignment is correct. When ready, select **Create** to assign the policy.
101
+
102
+
10. Notify your developers that the policy is in place. They receive an error message if they try to deploy a model that isn't in the list of allowed models.
103
+
104
+
105
+
# [Enforce specific deployment types](#tab/deployments)
106
+
107
+
The following policy allow you to control which types of deployments are allowed in the Azure AI Services or Azure OpenAI Resources. For example, you may want to prevent them from creating deployments that result in data processed in a different region. Follow these steps to create a policy that denies creating Global processing deployment types.
108
+
109
+
1. From the [Azure portal](https://portal.azure.com), select **Policy** from the left side of the page. You can also search for **Policy** in the search bar at the top of the page.
110
+
111
+
2. From the left side of the Azure Policy Dashboard, select **Authoring**, **Definitions**, and then select **+ Policy definition** from the top of the page.
112
+
113
+
3. In the **Policy Definition** form, use the following values:
114
+
115
+
- **Definition location**: Select the subscription or management group where you want to store the policy definition.
116
+
- **Name**: Enter a unique name for the policy definition. For example, `Custom allowed Azure AI services and Azure OpenAI deployments`.
117
+
- **Description**: Enter a description for the policy definition.
118
+
- **Category**: You can either create a new category or use an existing one. For example, "AI model governance."
119
+
- **Policy rule**: Enter the policy rule in JSON format. The following example shows a policy rule that blocks specific deployment types, particularly Global Standard.
4. Select **Save** to save the policy definition. After saving, you arrive at the policy definition's overview page.
145
+
146
+
5. From the policy definition's overview page, select **Assign policy** to assign the policy definition.
147
+
148
+
6. From the **Assign policy** page, use the following values on the **Basics** tab:
149
+
150
+
- **Scope**: Select the scope where you want to assign the policy. The scope can be a management group, subscription, or resource group.
151
+
- **Policy definition**: This field is prepopulated with the title of policy definition you created previously.
152
+
- **Assignment name**: Enter a unique name for the assignment.
153
+
- **Policy enforcement**: Make sure that the **Policy enforcement** field is set to **Enabled**. If it isn't enabled, the policy isn't enforced.
154
+
155
+
Select **Next** at the bottom of the page, or the **Parameters** tab at the top of the page.
156
+
157
+
7. Optionally, select the **Non-compliance messages** tab at the top of the page and set a custom message for noncompliance.
158
+
159
+
8. Select **Review + create** tab and verify that the policy assignment is correct. When ready, select **Create** to assign the policy.
160
+
161
+
9. Notify your developers that the policy is in place. They receive an error message if they try to deploy a model that isn't in the list of allowed models.
162
+
163
+
---
92
164
93
165
## Verify policy assignment
94
166
@@ -112,7 +184,6 @@ To update an existing policy assignment with new models, follow these steps:
112
184
113
185
## Best practices
114
186
115
-
- **Obtaining model names**: Use the [Azure AI Foundry Model Catalog](https://ai.azure.com/explore/models), then select the model to view details. Use the model name in the title with the policy.
116
187
- **Granular scoping**: Assign policies at the appropriate scope to balance control and flexibility. For example, apply at the subscription level to control all resources in the subscription, or apply at the resource group level to control resources in a specific group.
117
188
- **Policy naming**: Use a consistent naming convention for policy assignments to make it easier to identify the purpose of the policy. Include information such as the purpose and scope in the name.
118
189
- **Documentation**: Keep records of policy assignments and configurations for auditing purposes. Document any changes made to the policy over time.
@@ -123,6 +194,5 @@ To update an existing policy assignment with new models, follow these steps:
0 commit comments