From 0fab7a386bd325722dff54412758e05234d3f3d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaare=20B=C3=B8rsting?= Date: Mon, 26 Jan 2026 14:25:54 +0100 Subject: [PATCH 1/2] feat: optional app service name override --- Infrastructure/main.bicep | 9 +++++++-- Setup/azure-pipelines-deploy-jobs.yml | 4 ++++ Setup/azure-pipelines-external.yml | 4 ++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Infrastructure/main.bicep b/Infrastructure/main.bicep index 0b09a1d..d35d428 100644 --- a/Infrastructure/main.bicep +++ b/Infrastructure/main.bicep @@ -4,6 +4,9 @@ param websitePassword string @secure() param sessionSecret string +@description('Custom name for the App Service. If not provided, defaults to wa-{solutionId}') +param appServiceName string = '' + param adoOrganizationUrl string = '' param adoProjectName string = '' param adoRepositoryName string = '' @@ -28,6 +31,7 @@ param entraIdAllowedGroups string = '' param disablePasswordAuth bool = false var location = resourceGroup().location +var resolvedAppServiceName = empty(appServiceName) ? 'wa-${solutionId}' : appServiceName @description('Create an App Service Plan') resource appServicePlan 'Microsoft.Web/serverfarms@2021-02-01' = { @@ -44,7 +48,7 @@ resource appServicePlan 'Microsoft.Web/serverfarms@2021-02-01' = { @description('Create a Web App') resource webApp 'Microsoft.Web/sites@2021-02-01' = { - name: 'wa-${solutionId}' + name: resolvedAppServiceName location: location identity: { type: 'SystemAssigned' @@ -70,7 +74,7 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = { } { name: 'NEXTAUTH_URL' - value: 'https://wa-${solutionId}.azurewebsites.net' + value: 'https://${resolvedAppServiceName}.azurewebsites.net' } { name: 'WEBSITE_NODE_DEFAULT_VERSION' @@ -119,5 +123,6 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = { @description('Output the web app name and managed identity info') output webAppName string = webApp.name +output webAppUrl string = 'https://${webApp.properties.defaultHostName}' output managedIdentityPrincipalId string = webApp.identity.principalId output managedIdentityClientId string = webApp.identity.tenantId diff --git a/Setup/azure-pipelines-deploy-jobs.yml b/Setup/azure-pipelines-deploy-jobs.yml index 9b2bbec..6781e8d 100644 --- a/Setup/azure-pipelines-deploy-jobs.yml +++ b/Setup/azure-pipelines-deploy-jobs.yml @@ -23,6 +23,9 @@ parameters: - name: websiteName type: string default: '' + - name: appServiceName + type: string + default: '' - name: adoOrganizationUrl type: string default: '' @@ -69,6 +72,7 @@ steps: --parameters websitePassword="${{ parameters.websitePassword }}" ` --parameters sessionSecret="${{ parameters.websiteSessionSecret }}" ` --parameters solutionId="${{ parameters.websiteName }}" ` + --parameters appServiceName="${{ parameters.appServiceName }}" ` --parameters adoOrganizationUrl="${{ parameters.adoOrganizationUrl }}" ` --parameters adoProjectName="${{ parameters.adoProjectName }}" ` --parameters adoRepositoryName="${{ parameters.adoRepositoryName }}" ` diff --git a/Setup/azure-pipelines-external.yml b/Setup/azure-pipelines-external.yml index cc9c024..04b63bc 100644 --- a/Setup/azure-pipelines-external.yml +++ b/Setup/azure-pipelines-external.yml @@ -28,6 +28,9 @@ # - EnableEntraIdAuth (string: 'true' or 'false', default: 'false') # - DisablePasswordAuth (string: 'true' or 'false', default: 'false') # - EntraIdAllowedGroups (comma-separated list of Entra ID group object IDs) +# +# Optional variables (for custom naming): +# - AppServiceName (custom App Service name, defaults to wa-{WebsiteName} if not provided) trigger: none pr: none @@ -97,6 +100,7 @@ stages: websitePassword: $(WebsitePassword) websiteSessionSecret: $(WebsiteSessionSecret) websiteName: $(WebsiteName) + appServiceName: ${{ coalesce(variables.AppServiceName, '') }} adoOrganizationUrl: $(System.CollectionUri) adoProjectName: $(System.TeamProject) adoRepositoryName: ${{ coalesce(variables.AdoRepositoryName, '') }} From 3995bc1ed25448112eb60c046e6e604cf3800a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaare=20B=C3=B8rsting?= Date: Mon, 26 Jan 2026 15:16:50 +0100 Subject: [PATCH 2/2] chore: version bump --- Website/package-lock.json | 4 ++-- Website/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Website/package-lock.json b/Website/package-lock.json index d7d0084..db82e88 100644 --- a/Website/package-lock.json +++ b/Website/package-lock.json @@ -1,12 +1,12 @@ { "name": "website", - "version": "2.3.1", + "version": "2.3.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "website", - "version": "2.3.1", + "version": "2.3.3", "dependencies": { "@azure/identity": "^4.13.0", "@joint/core": "^4.1.3", diff --git a/Website/package.json b/Website/package.json index 778d4f4..92fd6b2 100644 --- a/Website/package.json +++ b/Website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "2.3.1", + "version": "2.3.3", "private": true, "scripts": { "dev": "next dev",