Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 31 additions & 0 deletions .azure/modules/afd-azurefrontdoor.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@


@description('Name of the Azure Front Door instance. Must be globally unique and 3-63 characters, using only lowercase letters, numbers, and hyphens, starting and ending with a letter or number.')
@minLength(3)
@maxLength(63)
param name string

@description('Location for the Azure Front Door resource. Must be set to global.')
@allowed(['global'])
param location string = 'global'

@description('Tags to apply to the Azure Front Door resource.')
param tags object = {}

@description('SKU for Azure Front Door. Allowed values: Standard_AzureFrontDoor, Premium_AzureFrontDoor. Default is Standard_AzureFrontDoor.')
@allowed([
'Standard_AzureFrontDoor'
'Premium_AzureFrontDoor'
])
param sku string = 'Standard_AzureFrontDoor'

resource afd 'Microsoft.Cdn/profiles@2023-05-01' = {
name: name
location: location
tags: tags
sku: {
name: sku
}
}

output id string = afd.id
95 changes: 95 additions & 0 deletions .azure/modules/api-appservice.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@

@description('The name of the App Service Web App. Must be 1-60 characters, using only alphanumeric characters and hyphens.')
@minLength(1)
@maxLength(60)
param name string

@description('The Azure region where the Web App will be deployed.')
param location string

@description('Tags to apply to the Web App resource.')
param tags object = {}

@description('The environment for the Web App. Allowed values: Development, QA, Staging, Production. Default is Development.')
@allowed([
'Development'
'QA'
'Staging'
'Production'
])
param environment string = 'Development'

@description('The Application Insights instrumentation key for the Web App.')
@minLength(1)
param appiKey string

@description('The Application Insights connection string for the Web App.')
@minLength(1)
param appiConnection string

@description('The resource ID of the App Service Plan.')
@minLength(1)
param planId string

@description('The kind of the Web App. Allowed values: api, app, app,linux, functionapp, functionapp,linux. Default is app.')
@allowed([
'api'
'app'
'app,linux'
'functionapp'
'functionapp,linux'
])
param kind string = 'app'

@description('The .NET version for the Web App. Allowed values: v4.8 (for .NET Framework), 6.0, 7.0, 8.0, 9.0, 10.0 (for .NET). Default is 10.0.')
@allowed([
'v4.8'
'6.0'
'7.0'
'8.0'
'9.0'
'10.0'
])
param dotnetVersion string = '10.0'

@description('Enable Always On for the App Service')
param alwaysOn bool = false

resource apiAppResource 'Microsoft.Web/sites@2023-12-01' = {
name: name
location: location
kind: kind
tags: empty(tags) ? null : tags
properties: {
serverFarmId: planId
httpsOnly: true
siteConfig: {
netFrameworkVersion: dotnetVersion
ftpsState: 'Disabled'
alwaysOn: alwaysOn
appSettings: [
{
name: 'APPINSIGHTS_INSTRUMENTATIONKEY'
value: appiKey
}
{
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
value: appiConnection
}
{
name: 'ASPNETCORE_ENVIRONMENT'
value: environment
}
{
name: 'WEBSITE_RUN_FROM_PACKAGE'
value: '1'
}
]
}
}
identity: {
type: 'SystemAssigned'
}
}

output id string = apiAppResource.id
49 changes: 49 additions & 0 deletions .azure/modules/apim-apimanagement.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

@description('The name of the API Management service instance. Must be 1-50 characters, use only letters, numbers, and hyphens, and start/end with a letter or number.')
@minLength(1)
@maxLength(50)
param name string = 'apiservice${uniqueString(resourceGroup().id)}'

@description('The email address of the owner of the API Management service. Must be a valid email address.')
@minLength(5)
@maxLength(100)
param publisherEmail string

@description('The name of the owner of the API Management service. Must be at least 1 character.')
@minLength(1)
param publisherName string

@description('The pricing tier (SKU) of this API Management service. Allowed values: Developer, Standard, Premium. Default is Developer.')
@allowed([
'Developer'
'Standard'
'Premium'
])
param sku string = 'Developer'

@description('Tags to apply to the API Management service resource.')
param tags object = {}

@description('The instance size (capacity) of this API Management service. Allowed values: 1, 2. Default is 1.')
@allowed([
1
2
])
param capacity int = 1

@description('Location for all resources. Defaults to the resource group location.')
param location string = resourceGroup().location

resource apimResource 'Microsoft.ApiManagement/service@2023-05-01-preview' = {
name: name
location: location
tags: tags
sku: {
name: sku
capacity: capacity
}
properties: {
publisherEmail: publisherEmail
publisherName: publisherName
}
}
32 changes: 32 additions & 0 deletions .azure/modules/app-appservicevnet.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@description('The location in which all resources should be deployed.')
param location string = resourceGroup().location

@description('The name of the app to create.')
param appName string = 'appName'

resource existingserverfarm 'Microsoft.Web/serverfarms@2023-01-01' existing={
name:'existingserverfarm'
}

resource vnetname 'Microsoft.Network/virtualNetworks@2023-06-01' existing ={
name:'vnetname'
}
resource subnet 'Microsoft.Network/virtualNetworks/subnets@2023-06-01' existing ={
name:'subnet'
parent: vnetname

}

resource webApp 'Microsoft.Web/sites@2023-01-01' = {
name: appName
location: location
kind: 'app'
properties: {
serverFarmId: existingserverfarm.id
virtualNetworkSubnetId:subnet.id
httpsOnly: true
siteConfig: {
http20Enabled: true
}
}
}
35 changes: 35 additions & 0 deletions .azure/modules/appcs-appconfigurationsetting.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@description('Specifies the name of the App Configuration store.')
param name string

@description('Sentinel key to refresh configs for no label and Development label.')
param appcsKeys array = [
'Shared:Sentinel'
'Shared:Sentinel$Development'
]

@description('Sentinel value is 1. When changed to 0, will trigger config refreshes.')
param appcsValues array = [
'1'
'1'
]

@description('Specifies the content type of the key-value resources. For feature flag, the value should be application/vnd.microsoft.appconfig.ff+json;charset=utf-8. For Key Value reference, the value should be application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8. Otherwise, it\'s optional.')
param contentType string = 'text/plain'

@description('Adds tags for the key-value resources. It\'s optional')
param tags object = {
tag1: 'tag-value-1'
tag2: 'tag-value-2'
}

resource name_appcsKeys 'Microsoft.AppConfiguration/configurationStores/keyValues@2023-03-01' = [for (item, i) in appcsKeys: {
name: '${name}/${item}'
properties: {
value: appcsValues[i]
contentType: contentType
tags: empty(tags) ? null : tags
}
}]

output reference_key_value_value string = reference(resourceId('Microsoft.AppConfiguration/configurationStores/keyValues', name, appcsKeys[0]), '2020-07-01-preview').value
output reference_key_value_object object = reference(resourceId('Microsoft.AppConfiguration/configurationStores/keyValues', name, appcsKeys[1]), '2020-07-01-preview')
31 changes: 31 additions & 0 deletions .azure/modules/appcs-appconfigurationstore.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@description('Specifies the name of the App Configuration store. 5-50 chars, lowercase letters, numbers, and -')
@minLength(5)
@maxLength(50)
param name string

@description('Specifies the sku of the App Configuration store.')
@allowed([
'free'
'standard'
])
param sku string = 'free'

@description('Specifies the Azure location where the app configuration store should be created.')
param location string = toLower(replace(resourceGroup().location, ' ', ''))

resource name_resource 'Microsoft.AppConfiguration/configurationStores@2023-03-01' = {
name: name
location: location
sku: {
name: sku
}
identity: {
type: 'SystemAssigned'
}
properties: {
disableLocalAuth: true
publicNetworkAccess: 'Disabled'
}
}


39 changes: 39 additions & 0 deletions .azure/modules/appi-applicationinsights.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@


@description('The Azure region where the Application Insights resource will be deployed. Allowed: eastus, eastus2, westus, westus2, centralus.')
@allowed([
'eastus'
'eastus2'
'westus'
'westus2'
'centralus'
])
param location string

@description('Tags to apply to the Application Insights resource.')
param tags object = {}

@description('Specifies the name of the Application Insights resource. 1-255 characters, letters, numbers, and -')
@minLength(1)
@maxLength(255)
param name string

@description('The resource ID of the Log Analytics workspace to link to Application Insights. Must be a valid resourceId string.')
@minLength(1)
param workResourceId string

resource appiResource 'Microsoft.Insights/components@2020-02-02' = {
name: name
location: location
tags: empty(tags) ? null : tags
kind:'web'
properties: {
Application_Type: 'web'
Flow_Type: 'Bluefield'
WorkspaceResourceId: workResourceId
}
}

output id string = appiResource.id
output InstrumentationKey string = appiResource.properties.InstrumentationKey
output Connectionstring string = appiResource.properties.ConnectionString
28 changes: 28 additions & 0 deletions .azure/modules/cdn-contentdeliverynetwork.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

@description('The name of the Storage Account for CDN. Must be 3-24 characters, using only lowercase letters and numbers.')
@minLength(3)
@maxLength(24)
param name string

@description('The SKU (pricing tier) for the Storage Account. Allowed values: Standard_LRS, Standard_GRS, Standard_RAGRS, Standard_ZRS, Premium_LRS, Premium_ZRS. Default is Standard_LRS.')
@allowed([
'Standard_LRS'
'Standard_GRS'
'Standard_RAGRS'
'Standard_ZRS'
'Premium_LRS'
'Premium_ZRS'
])
param sku string = 'Standard_LRS'

resource storageAccountName 'Microsoft.Storage/storageAccounts@2023-05-01' = {
name: name
location: resourceGroup().location
tags: {
displayName: name
}
sku: {
name: sku
}
kind: 'Storage'
}
21 changes: 21 additions & 0 deletions .azure/modules/cog-cognitiveservices.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

@description('The name of the Cognitive Services account. Must be unique within Azure. Recommended format: <name>-<resourceGroupName>. 3-64 characters, lowercase letters, numbers, and hyphens.')
@minLength(3)
@maxLength(64)
param name string = 'CognitiveService-${uniqueString(resourceGroup().id)}'


@description('The SKU (pricing tier) for the Cognitive Services account. Allowed values: S0 (Standard). Default is S0.')
@allowed([
'S0'
])
param sku string = 'S0'

resource name_resource 'Microsoft.CognitiveServices/accounts@2023-05-01' = {
name: name
location: resourceGroup().location
sku: {
name: sku
}
kind: 'CognitiveServices'
}
24 changes: 24 additions & 0 deletions .azure/modules/cogtext-textanalytics.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@description('That name is the name of our application. It has to be unique.Type a name followed by your resource group name. (<name>-<resourceGroupName>)')
param name string = 'CognitiveService-${uniqueString(resourceGroup().id)}'

@description('Sku (pricing tier) of this resource')
@allowed([
'F0'
'S'
])
param sku string = 'F0'

@description('Location (region) of this resource')
param location string = toLower(replace(resourceGroup().location, ' ', ''))

resource name_resource 'Microsoft.CognitiveServices/accounts@2023-05-01' = {
kind: 'TextAnalytics'
name: name
location: location
sku: {
name: sku
}
properties: {
customSubDomainName: name
}
}
Loading
Loading