Skip to content

Commit 03804ab

Browse files
committed
add sample
1 parent 5379c70 commit 03804ab

File tree

2 files changed

+30
-14
lines changed

2 files changed

+30
-14
lines changed

samples/microsoft/infrastructure-setup/05-custom-policy-definitions/README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,6 @@
22

33
Azure Policy enables you to put guardrails on resource configurations and enable self-serve resource creation in your organization. This repository shows examples for common scenarios in Azure AI Foundry.
44

5-
## Available Policies
6-
7-
### 1. Deny Disallowed Connections (`deny-disallowed-connections.json`)
8-
This policy restricts AI Foundry project connections to only allow specific categories. By default, it only allows `CognitiveSearch` connections, but this can be customized via parameters.
9-
10-
**Policy Effect**: Deny
11-
**Scope**: Microsoft.CognitiveServices/accounts/projects/connections
12-
13-
### 2. Deny Key Authentication Connections (`deny-key-auth-connections.json`)
14-
This policy prevents the creation of connections that use key-based authentication methods.
15-
16-
### 3. Audit Enabled VNet Injection (`audit-enabled-vnet-injection.json`)
17-
This policy audits whether VNet injection is properly enabled for AI Foundry resources.
18-
195
## Deployment
206

217
### Prerequisites
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"properties": {
3+
"displayName": "Deny account kinds that do not support the full AI Foundry capabilities.",
4+
"policyType": "Custom",
5+
"mode": "All",
6+
"description": "This policy denies the creation of account kinds that do not support the full AI Foundry capabilities.",
7+
"version": "1.0.0",
8+
"parameters": {},
9+
"policyRule": {
10+
"if": {
11+
"allOf": [
12+
{
13+
"field": "type",
14+
"equals": "Microsoft.CognitiveServices/accounts"
15+
},
16+
{
17+
"field": "kind",
18+
"notEquals": "AIServices"
19+
}
20+
]
21+
},
22+
"then": {
23+
"effect": "deny"
24+
}
25+
},
26+
"versions": [
27+
"1.0.0"
28+
]
29+
}
30+
}

0 commit comments

Comments
 (0)