-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File cognitiveservices.bicep does not include the networkAcls property #250
Comments
@luisquintanilla : indeed, when running the azd up command, I would receive an error related to the 'Document intelligence' resource being provisioned: "BadRequest: NetworkAcls is required for this resource." See the error that had been reported for the sister python project: Azure-Samples/azure-search-openai-demo#799). |
@gillesev and to confirm, you're running the latest version in the |
Yes |
Here's the latest for AI cognitive services: https://github.com/Azure/azure-dev/blob/main/templates/common/infra/bicep/core/ai/cognitiveservices.bicep - You'll need to copy that over to this project. |
I am getting this networkAcls error on my openai service. Has this fix not been merged to main yet? Basically, I already have AI and Cog Services up and running and working with other solutions. I simply want to run this sample in Codespaces and play around. I therefore run all the azd env set commands to setup AOPEN AI variables in the .env. The deployment fails on the openai service. Take a look at the screenshot below for more details. |
@Rickcau Try replacing your infra/core/ai/cognitiveservices.bicep file with the one found here and run it again. Sorry for hassle, we are working on making this easier. |
The file https://github.com/Azure-Samples/azure-search-openai-demo-csharp/blob/main/infra/core/ai/cognitiveservices.bicep should be (following fix Azure-Samples/azure-search-openai-demo#799 issued for the python version of the azure-search-openai-demo):
metadata description = 'Creates an Azure Cognitive Services instance.'
param name string
param location string = resourceGroup().location
param tags object = {}
@description('The custom subdomain name used to access the API. Defaults to the value of the name parameter.')
param customSubDomainName string = name
param deployments array = []
param kind string = 'OpenAI'
@Allowed([ 'Enabled', 'Disabled' ])
param publicNetworkAccess string = 'Enabled'
param sku object = {
name: 'S0'
}
param allowedIpRules array = []
param networkAcls object = empty(allowedIpRules) ? {
defaultAction: 'Allow'
} : {
ipRules: allowedIpRules
defaultAction: 'Deny'
}
resource account 'Microsoft.CognitiveServices/accounts@2023-05-01' = {
name: name
location: location
tags: tags
kind: kind
properties: {
customSubDomainName: customSubDomainName
publicNetworkAccess: publicNetworkAccess
networkAcls: networkAcls
}
sku: sku
}
@batchsize(1)
resource deployment 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01' = [for deployment in deployments: {
parent: account
name: deployment.name
properties: {
model: deployment.model
raiPolicyName: contains(deployment, 'raiPolicyName') ? deployment.raiPolicyName : null
}
sku: contains(deployment, 'sku') ? deployment.sku : {
name: 'Standard'
capacity: 20
}
}]
output endpoint string = account.properties.endpoint
output id string = account.id
output name string = account.name
The text was updated successfully, but these errors were encountered: