Skip to content

Instantly share code, notes, and snippets.

@FrankDeGroot
Last active October 11, 2025 13:44
Show Gist options
  • Select an option

  • Save FrankDeGroot/f4ecb8074099e0ddfb4337327c171ca2 to your computer and use it in GitHub Desktop.

Select an option

Save FrankDeGroot/f4ecb8074099e0ddfb4337327c171ca2 to your computer and use it in GitHub Desktop.
param location string
param webAppName string
param keyVaultName string
param applicationInsightsConnectionString string
var appServicePlanName = 'sitePlan-${webAppName}'
resource appServicePlan 'Microsoft.Web/serverfarms@2024-04-01' = {
name: appServicePlanName
location: location
sku: {
name: 'F1'
tier: 'Free'
}
properties: {
reserved: true
}
kind: 'app'
}
resource appServiceApp 'Microsoft.Web/sites@2024-04-01' = {
name: webAppName
location: location
properties: {
serverFarmId: appServicePlan.id
httpsOnly: true
siteConfig: {
linuxFxVersion: 'DOTNETCORE|8.0'
acrUseManagedIdentityCreds: false
healthCheckPath: '/health'
appSettings: [
{
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
value: applicationInsightsConnectionString
}
{
name: 'ASPNETCORE_ENVIRONMENT'
// value: 'Development'
value: '@Microsoft.KeyVault(VaultName=${keyVaultName};SecretName=aspnetcoreenvironment)'
}
]
}
}
identity: {
type: 'SystemAssigned'
}
}
output webAppUrl string = 'https://${appServiceApp.properties.defaultHostName}'
output webAppIdentity string = appServiceApp.identity.principalId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment