Skip to content

Commit 99aa075

Browse files
committed
chore: update infra to disable local auth
1 parent 5967a12 commit 99aa075

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

infra/core/ai/cognitiveservices.bicep

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
1+
metadata description = 'Creates an Azure Cognitive Services instance.'
12
param name string
23
param location string = resourceGroup().location
34
param tags object = {}
4-
5+
@description('The custom subdomain name used to access the API. Defaults to the value of the name parameter.')
56
param customSubDomainName string = name
67
param deployments array = []
78
param kind string = 'OpenAI'
9+
10+
@allowed([ 'Enabled', 'Disabled' ])
811
param publicNetworkAccess string = 'Enabled'
912
param sku object = {
1013
name: 'S0'
1114
}
1215

16+
param allowedIpRules array = []
17+
param networkAcls object = empty(allowedIpRules) ? {
18+
defaultAction: 'Allow'
19+
} : {
20+
ipRules: allowedIpRules
21+
defaultAction: 'Deny'
22+
}
23+
param disableLocalAuth bool = false
24+
1325
resource account 'Microsoft.CognitiveServices/accounts@2023-05-01' = {
1426
name: name
1527
location: location
@@ -18,6 +30,8 @@ resource account 'Microsoft.CognitiveServices/accounts@2023-05-01' = {
1830
properties: {
1931
customSubDomainName: customSubDomainName
2032
publicNetworkAccess: publicNetworkAccess
33+
networkAcls: networkAcls
34+
disableLocalAuth: disableLocalAuth
2135
}
2236
sku: sku
2337
}

infra/main.bicep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ module openAi 'core/ai/cognitiveservices.bicep' = if (empty(openAiUrl)) {
252252
sku: {
253253
name: openAiSkuName
254254
}
255+
disableLocalAuth: true
255256
deployments: [
256257
{
257258
name: chatGptDeploymentName

0 commit comments

Comments
 (0)