Skip to content

Commit c1abac1

Browse files
amgdypamelafox
andauthored
Fix: BadRequest: NetworkAcls is required for this resouce. (#799)
* Fix: BadRequest: NetworkAcls is required for this resouce. Fixes the error: ERROR: deployment failed: failing invoking action 'provision', error deploying infrastructure: deploying to subscription: Deployment Error Details: BadRequest: NetworkAcls is required for this resouce. * Updating bicep file --------- Co-authored-by: Pamela Fox <[email protected]> Co-authored-by: Pamela Fox <[email protected]>
1 parent 13e4cd8 commit c1abac1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

infra/core/ai/cognitiveservices.bicep

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,21 @@ param tags object = {}
66
param customSubDomainName string = name
77
param deployments array = []
88
param kind string = 'OpenAI'
9+
10+
@allowed([ 'Enabled', 'Disabled' ])
911
param publicNetworkAccess string = 'Enabled'
1012
param sku object = {
1113
name: 'S0'
1214
}
1315

16+
param allowedIpRules array = []
17+
param networkAcls object = empty(allowedIpRules) ? {
18+
defaultAction: 'Allow'
19+
} : {
20+
ipRules: allowedIpRules
21+
defaultAction: 'Deny'
22+
}
23+
1424
resource account 'Microsoft.CognitiveServices/accounts@2023-05-01' = {
1525
name: name
1626
location: location
@@ -19,6 +29,7 @@ resource account 'Microsoft.CognitiveServices/accounts@2023-05-01' = {
1929
properties: {
2030
customSubDomainName: customSubDomainName
2131
publicNetworkAccess: publicNetworkAccess
32+
networkAcls: networkAcls
2233
}
2334
sku: sku
2435
}

0 commit comments

Comments
 (0)