Skip to content

Commit 92ec338

Browse files
committed
feat: moving azure policies configuration to model inference
1 parent bfd8ca5 commit 92ec338

File tree

4 files changed

+98
-23
lines changed

4 files changed

+98
-23
lines changed

articles/ai-studio/how-to/custom-policy-model-deployment.md renamed to articles/ai-foundry/model-inference/how-to/configure-deployment-policies.md

Lines changed: 91 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
---
2-
title: Control AI model deployment with custom policies
2+
title: Control model deployment with custom policies
33
titleSuffix: Azure AI Foundry
44
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
78
ms.service: azure-ai-foundry
89
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
1311
---
1412

15-
# Control AI model deployment with custom policies in Azure AI Foundry portal
13+
# Control model deployment with custom policies
1614

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.
1816

1917
## Prerequisites
2018

@@ -24,9 +22,17 @@ When using models from Azure AI services and Azure OpenAI with Azure AI Foundry,
2422

2523
## Create a custom policy
2624

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+
2731
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:
3036

3137
- **Definition location**: Select the subscription or management group where you want to store the policy definition.
3238
- **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,
7177
}
7278
```
7379

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:
7785

7886
- **Scope**: Select the scope where you want to assign the policy. The scope can be a management group, subscription, or resource group.
7987
- **Policy definition**: This field is prepopulated with the title of policy definition you created previously.
8088
- **Assignment name**: Enter a unique name for the assignment.
8189
- **Policy enforcement**: Make sure that the **Policy enforcement** field is set to **Enabled**. If it isn't enabled, the policy isn't enforced.
8290

8391
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"]`.
8594

8695
> [!TIP]
8796
> 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.
8897

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.
120+
121+
```json
122+
{
123+
"mode": "All",
124+
"policyRule": {
125+
"if": {
126+
"allOf": [
127+
{
128+
"field": "type",
129+
"equals": "Microsoft.CognitiveServices/accounts/deployments"
130+
},
131+
{
132+
"field": "Microsoft.CognitiveServices/accounts/deployments/sku.name",
133+
"equals": "GlobalStandard"
134+
}
135+
]
136+
},
137+
"then": {
138+
"effect": "deny"
139+
}
140+
}
141+
}
142+
```
143+
144+
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+
---
92164

93165
## Verify policy assignment
94166

@@ -112,7 +184,6 @@ To update an existing policy assignment with new models, follow these steps:
112184

113185
## Best practices
114186

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.
116187
- **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.
117188
- **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.
118189
- **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:
123194
## Related content
124195

125196
- [Azure Policy overview](/azure/governance/policy/overview)
126-
- [Azure AI Foundry model catalog](model-catalog-overview.md)
127-
- [Azure AI services documentation](/azure/ai-services)
197+
- [Deployment types](../concepts/deployment-types.md)
128198

articles/ai-foundry/model-inference/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ items:
5757
- name: Configure key-less authentication
5858
href: ./how-to/configure-entra-id.md
5959
- name: Control model deployment with custom policies
60-
href: /azure/ai-studio/how-to/custom-policy-model-deployment?context=/azure/ai-foundry/model-inference/context/context
60+
href: ./how-to/configure-deployment-policies.md
6161
- name: Manage cost
6262
href: ./how-to/manage-costs.md
6363
- name: Quotas and limits

articles/ai-studio/.openpublishing.redirection.ai-studio.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@
210210
"redirect_url": "/azure/ai-foundry/model-inference/how-to/create-model-deployments",
211211
"redirect_document_id": false
212212
},
213+
{
214+
"source_path_from_root": "/articles/ai-studio/how-to/custom-policy-model-deployment.md",
215+
"redirect_url": "/azure/ai-foundry/model-inference/how-to/configure-deployment-policies.md",
216+
"redirect_document_id": true
217+
},
213218
{
214219
"source_path_from_root": "/articles/ai-studio/ai-services/how-to/content-safety.md",
215220
"redirect_url": "/azure/ai-services/content-safety/how-to/foundry",

articles/ai-studio/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ items:
405405
- name: Built-in policy to allow specific models
406406
href: how-to/built-in-policy-model-deployment.md
407407
- name: Custom policy to allow specific models
408-
href: how-to/custom-policy-model-deployment.md
408+
href: ../ai-services/model-inference/how-to/configure-deployment-policies.md?context=/azure/ai-studio/context/context
409409
- name: Vulnerability management
410410
href: concepts/vulnerability-management.md
411411
- name: Disaster recovery

0 commit comments

Comments
 (0)