-
Notifications
You must be signed in to change notification settings - Fork 396
/
Copy pathai-search.bicep
37 lines (31 loc) · 1.02 KB
/
ai-search.bicep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
@description('The name of the AI Search instance.')
param name string
@description('The location of the Managed Cluster resource.')
param location string = resourceGroup().location
@description('Array of objects with fields principalId, principalType, roleDefinitionId')
param roleAssignments array = []
resource aiSearch 'Microsoft.Search/searchServices@2024-03-01-preview' = {
name: name
location: location
sku: {
name: 'standard'
}
properties: {
disableLocalAuth: true
replicaCount: 1
partitionCount: 1
publicNetworkAccess: 'disabled'
semanticSearch: 'disabled'
}
}
resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [
for roleAssignment in roleAssignments: {
name: guid('${roleAssignment.principalId}-${roleAssignment.principalType}-${roleAssignment.roleDefinitionId}')
scope: aiSearch
properties: roleAssignment
}
]
output id string = aiSearch.id
output name string = aiSearch.name