Azdev-ify changes for latest /bicep/core
This commit is contained in:
31
infra/app/catalog-db.bicep
Normal file
31
infra/app/catalog-db.bicep
Normal file
@@ -0,0 +1,31 @@
|
||||
param name string
|
||||
param location string = resourceGroup().location
|
||||
param tags object = {}
|
||||
|
||||
param databaseName string = 'CatalogDB'
|
||||
param keyVaultName string
|
||||
|
||||
@secure()
|
||||
param sqlAdminPassword string
|
||||
@secure()
|
||||
param appUserPassword string
|
||||
|
||||
// Because databaseName is optional in main.bicep, we make sure the database name is set here.
|
||||
var defaultDatabaseName = 'Todo'
|
||||
var actualDatabaseName = !empty(databaseName) ? databaseName : defaultDatabaseName
|
||||
|
||||
module sqlServer1 '../core/database/sqlserver/sqlserver1.bicep' = {
|
||||
name: 'sqlServer01'
|
||||
params: {
|
||||
name: name
|
||||
location: location
|
||||
tags: tags
|
||||
databaseName: actualDatabaseName
|
||||
keyVaultName: keyVaultName
|
||||
sqlAdminPassword: sqlAdminPassword
|
||||
appUserPassword: appUserPassword
|
||||
}
|
||||
}
|
||||
|
||||
output sqlCatalogConnectionStringKey string = sqlServer1.outputs.connectionStringKey
|
||||
output sqlCatalogDatabase1Name string = sqlServer1.outputs.databaseName
|
||||
@@ -1,25 +0,0 @@
|
||||
param environmentName string
|
||||
param location string = resourceGroup().location
|
||||
|
||||
param databaseName string = 'CatalogDB'
|
||||
param keyVaultName string
|
||||
|
||||
@secure()
|
||||
param sqlAdminPassword string
|
||||
@secure()
|
||||
param appUserPassword string
|
||||
|
||||
module sqlServer1 '../core/database/sqlserver1.bicep' = {
|
||||
name: 'sqlServer1'
|
||||
params: {
|
||||
environmentName: environmentName
|
||||
location: location
|
||||
dbName: databaseName
|
||||
keyVaultName: keyVaultName
|
||||
sqlAdminPassword: sqlAdminPassword
|
||||
appUserPassword: appUserPassword
|
||||
}
|
||||
}
|
||||
|
||||
output sqlConnectionStringKey string = sqlServer1.outputs.sqlConnectionStringKey
|
||||
output sqlDatabase1Name string = databaseName
|
||||
@@ -1,25 +0,0 @@
|
||||
param environmentName string
|
||||
param location string = resourceGroup().location
|
||||
|
||||
param databaseName string = 'IdentityDB'
|
||||
param keyVaultName string
|
||||
|
||||
@secure()
|
||||
param sqlAdminPassword string
|
||||
@secure()
|
||||
param appUserPassword string
|
||||
|
||||
module sqlServer2 '../core/database/sqlserver2.bicep' = {
|
||||
name: 'sqlServer2'
|
||||
params: {
|
||||
environmentName: environmentName
|
||||
location: location
|
||||
dbName: databaseName
|
||||
keyVaultName: keyVaultName
|
||||
sqlAdminPassword: sqlAdminPassword
|
||||
appUserPassword: appUserPassword
|
||||
}
|
||||
}
|
||||
|
||||
output sqlConnectionStringKey string = sqlServer2.outputs.sqlConnectionStringKey
|
||||
output sqlDatabase2Name string = databaseName
|
||||
31
infra/app/identity-db.bicep
Normal file
31
infra/app/identity-db.bicep
Normal file
@@ -0,0 +1,31 @@
|
||||
param name string
|
||||
param location string = resourceGroup().location
|
||||
param tags object = {}
|
||||
|
||||
param databaseName string = 'IdentityDB'
|
||||
param keyVaultName string
|
||||
|
||||
@secure()
|
||||
param sqlAdminPassword string
|
||||
@secure()
|
||||
param appUserPassword string
|
||||
|
||||
// Because databaseName is optional in main.bicep, we make sure the database name is set here.
|
||||
var defaultDatabaseName = 'Todo'
|
||||
var actualDatabaseName = !empty(databaseName) ? databaseName : defaultDatabaseName
|
||||
|
||||
module sqlServer2 '../core/database/sqlserver/sqlserver2.bicep' = {
|
||||
name: 'sqlServer02'
|
||||
params: {
|
||||
name: name
|
||||
location: location
|
||||
tags: tags
|
||||
databaseName: actualDatabaseName
|
||||
keyVaultName: keyVaultName
|
||||
sqlAdminPassword: sqlAdminPassword
|
||||
appUserPassword: appUserPassword
|
||||
}
|
||||
}
|
||||
|
||||
output sqlCatalogConnectionStringKey string = sqlServer2.outputs.connectionStringKey
|
||||
output sqlCatalogDatabase1Name string = sqlServer2.outputs.databaseName
|
||||
@@ -1,18 +1,23 @@
|
||||
param environmentName string
|
||||
param name string
|
||||
param location string = resourceGroup().location
|
||||
param appServicePlanId string
|
||||
|
||||
param tags object = {}
|
||||
param serviceName string = 'web'
|
||||
param appCommandLine string = 'pm2 serve /home/site/wwwroot --no-daemon --spa'
|
||||
param applicationInsightsName string = ''
|
||||
param appServicePlanId string
|
||||
param appSettings object = {}
|
||||
|
||||
module web '../core/host/appservice-dotnet.bicep' = {
|
||||
name: '${serviceName}-appservice-dotnet-module'
|
||||
module web '../core/host/appservice.bicep' = {
|
||||
name: '${name}-deployment'
|
||||
params: {
|
||||
environmentName: environmentName
|
||||
name: name
|
||||
location: location
|
||||
appServicePlanId: appServicePlanId
|
||||
serviceName: serviceName
|
||||
runtimeName: 'dotnetcore'
|
||||
runtimeVersion: '6.0'
|
||||
tags: union(tags, { 'azd-service-name': serviceName })
|
||||
scmDoBuildDuringDeployment: false
|
||||
}
|
||||
}
|
||||
|
||||
output WEB_NAME string = web.outputs.name
|
||||
output WEB_URI string = web.outputs.uri
|
||||
output REACT_APP_WEB_BASE_URL string = web.outputs.uri
|
||||
|
||||
Reference in New Issue
Block a user