Last active
October 11, 2025 13:44
-
-
Save FrankDeGroot/f4ecb8074099e0ddfb4337327c171ca2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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