Azdevify eshopOnWeb

This commit is contained in:
zedy
2022-10-25 14:06:09 +08:00
parent a72dd775ee
commit 04895cc138
37 changed files with 2675 additions and 0 deletions

46
infra/main.bicep Normal file
View File

@@ -0,0 +1,46 @@
targetScope = 'subscription'
@minLength(1)
@maxLength(64)
@description('Name of the the environment which is used to generate a short unique hash used in all resources.')
param environmentName string
@minLength(1)
@description('Primary location for all resources')
param location string
@description('Id of the user or app to assign application roles')
param principalId string = ''
@secure()
@description('SQL Server administrator password')
param sqlAdminPassword string
@secure()
@description('Application user password')
param appUserPassword string
var abbrs = loadJsonContent('./abbreviations.json')
var tags = { 'azd-env-name': environmentName }
resource rg 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: '${abbrs.resourcesResourceGroups}${environmentName}'
location: location
tags: tags
}
module resources 'resources.bicep' = {
name: 'resources'
scope: rg
params: {
environmentName: environmentName
location: location
principalId: principalId
sqlAdminPassword: sqlAdminPassword
appUserPassword: appUserPassword
}
}
output AZURE_LOCATION string = location
output AZURE_TENANT_ID string = tenant().tenantId
output REACT_APP_WEB_BASE_URL string = resources.outputs.WEB_URI