From 6dd2d504b2d67688a99bb9bad3aa1d8070bddf9b Mon Sep 17 00:00:00 2001 From: "Aman Kumar [SSW]" <71385247+amankumarrr@users.noreply.github.com> Date: Mon, 29 Apr 2024 11:34:21 +1000 Subject: [PATCH] App Service - Enabling Health Check (#2535) * App Service - Enabling Health Check * Updating template versions --- infra/appService-create-pr-slot.bicep | 4 ++-- infra/appService.bicep | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/infra/appService-create-pr-slot.bicep b/infra/appService-create-pr-slot.bicep index c73b17a2f1..4ffcadf197 100644 --- a/infra/appService-create-pr-slot.bicep +++ b/infra/appService-create-pr-slot.bicep @@ -83,11 +83,11 @@ var appSettings = [ ] -resource prodSlot 'Microsoft.Web/sites@2022-03-01' existing = { +resource prodSlot 'Microsoft.Web/sites@2023-01-01' existing = { name: appServiceName } -resource prSlot 'Microsoft.Web/sites/slots@2021-02-01' = { +resource prSlot 'Microsoft.Web/sites/slots@2023-01-01' = { name: slotName parent: prodSlot location: location diff --git a/infra/appService.bicep b/infra/appService.bicep index c666725c83..e46819375c 100644 --- a/infra/appService.bicep +++ b/infra/appService.bicep @@ -6,6 +6,8 @@ param dockerRegistryServerURL string param appInsightConnectionString string param keyVaultName string +param healthCheckPath string = '/' + @allowed([ 'B1' 'B2' @@ -131,7 +133,7 @@ var appSettings = [ var productionName = 'app-${projectName}-${entropy}' var kind = 'app,linux,container' -resource appService 'Microsoft.Web/sites@2022-03-01' = { +resource appService 'Microsoft.Web/sites@2023-01-01' = { name: productionName location: location kind: 'app,linux,container' @@ -151,12 +153,13 @@ resource appService 'Microsoft.Web/sites@2022-03-01' = { http20Enabled: true minTlsVersion: '1.2' linuxFxVersion: 'DOCKER|${acr.properties.loginServer}/${dockerImage}:production' + healthCheckPath: healthCheckPath } clientAffinityEnabled: false } } -resource stagingSlot 'Microsoft.Web/sites/slots@2022-09-01' = { +resource stagingSlot 'Microsoft.Web/sites/slots@2023-01-01' = { parent: appService name: 'staging' location: location