-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
499 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
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' | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@description('The name of the app service resource within the current resource group scope') | ||
param name string | ||
|
||
@description('The app settings to be applied to the app service') | ||
param appSettings object | ||
|
||
resource appService 'Microsoft.Web/sites@2022-03-01' existing = { | ||
name: name | ||
} | ||
|
||
resource settings 'Microsoft.Web/sites/config@2022-03-01' = { | ||
name: 'appsettings' | ||
parent: appService | ||
properties: appSettings | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
param name string | ||
param location string = resourceGroup().location | ||
param tags object = {} | ||
|
||
@description('The name of the CDN profile resource') | ||
@minLength(1) | ||
param cdnProfileName string | ||
|
||
@description('Delivery policy rules') | ||
param deliveryPolicyRules array = [] | ||
|
||
@description('The origin URL for the endpoint') | ||
@minLength(1) | ||
param originUrl string | ||
|
||
resource endpoint 'Microsoft.Cdn/profiles/endpoints@2022-05-01-preview' = { | ||
parent: cdnProfile | ||
name: name | ||
location: location | ||
tags: tags | ||
properties: { | ||
originHostHeader: originUrl | ||
isHttpAllowed: false | ||
isHttpsAllowed: true | ||
queryStringCachingBehavior: 'UseQueryString' | ||
optimizationType: 'GeneralWebDelivery' | ||
origins: [ | ||
{ | ||
name: replace(originUrl, '.', '-') | ||
properties: { | ||
hostName: originUrl | ||
originHostHeader: originUrl | ||
priority: 1 | ||
weight: 1000 | ||
enabled: true | ||
} | ||
} | ||
] | ||
deliveryPolicy: { | ||
rules: deliveryPolicyRules | ||
} | ||
} | ||
} | ||
|
||
resource cdnProfile 'Microsoft.Cdn/profiles@2022-05-01-preview' existing = { | ||
name: cdnProfileName | ||
} | ||
|
||
output id string = endpoint.id | ||
output name string = endpoint.name | ||
output uri string = 'https://${endpoint.properties.hostName}' |
Oops, something went wrong.