move bicep to corresponding example

This commit is contained in:
bob
2026-01-28 10:31:18 -06:00
parent 1e90daabb5
commit 3878a182c6
5 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
targetScope = 'subscription'
@description('The name of the resource group')
param resourceGroupName string = 'rg-blazor-grafana'
@description('The location for all resources')
param location string = 'eastus'
@description('The name of the App Service Plan')
param appServicePlanName string = 'asp-blazor-app'
@description('The name of the Web App')
param webAppName string = 'webapp-blazor-${uniqueString(resourceGroupName)}'
@description('The name of the Application Insights instance')
param appInsightsName string = 'ai-blazor-app'
@description('The name of the Log Analytics Workspace')
param logAnalyticsWorkspaceName string = 'law-blazor-app'
// Create the resource group
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: resourceGroupName
location: location
}
// Deploy the logging and monitoring infrastructure
module monitoring 'modules/monitoring.bicep' = {
scope: resourceGroup
name: 'monitoring-deployment'
params: {
location: location
appInsightsName: appInsightsName
logAnalyticsWorkspaceName: logAnalyticsWorkspaceName
}
}
// Deploy the App Service infrastructure
module appService 'modules/appService.bicep' = {
scope: resourceGroup
name: 'appservice-deployment'
params: {
location: location
appServicePlanName: appServicePlanName
webAppName: webAppName
appInsightsInstrumentationKey: monitoring.outputs.instrumentationKey
appInsightsConnectionString: monitoring.outputs.connectionString
}
}
// Outputs
output resourceGroupName string = resourceGroup.name
output webAppName string = appService.outputs.webAppName
output webAppUrl string = appService.outputs.webAppUrl
output appInsightsName string = monitoring.outputs.appInsightsName
output logAnalyticsWorkspaceId string = monitoring.outputs.workspaceId
output grafanaName string = monitoring.outputs.grafanaName
output grafanaEndpoint string = monitoring.outputs.grafanaEndpoint