Skip to content

Instantly share code, notes, and snippets.

@timothywarner
Created August 24, 2023 13:11
Show Gist options
  • Save timothywarner/5b4e948ff66122fd462524d9f0558fda to your computer and use it in GitHub Desktop.
Save timothywarner/5b4e948ff66122fd462524d9f0558fda to your computer and use it in GitHub Desktop.
azureopenai.blog
param name string
param location string = resourceGroup().location
param tags object = {}
param customSubDomainName string = name
param deployments array = []
param kind string = 'OpenAI'
param publicNetworkAccess string = 'Enabled'
param sku object = {
name: 'S0'
}
resource account 'Microsoft.CognitiveServices/accounts@2022-10-01' = {
name: name
location: location
tags: tags
kind: kind
properties: {
customSubDomainName: customSubDomainName
publicNetworkAccess: publicNetworkAccess
}
sku: sku
}
@batchSize(1)
resource deployment 'Microsoft.CognitiveServices/accounts/deployments@2022-10-01' = [for deployment in deployments: {
parent: account
name: deployment.name
properties: {
model: deployment.model
raiPolicyName: contains(deployment, 'raiPolicyName') ? deployment.raiPolicyName : null
scaleSettings: deployment.scaleSettings
}
}]
output endpoint string = account.properties.endpoint
output id string = account.id
output name string = account.name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment