I'm starting to wonder whether this is the right tool for the job, still here goes.
I'm attempting to automate the creation of our Azure Test environment using Azure SDK for JS. The environment spans many services (as you can imagine), including Classic ASP.NET app services.
Node is my safe space, so that is why I started with the JS SDK.
I have started scripting the creation of an app service using WebSiteManagementClient.webApps.createOrUpdate
. I'm confused though, there is seemingly no way to configure any of the following:
- Which app service plan the app service should be connected to. This feels fundamental.
- The operating system, Windows or Linux.
- The stack version, .NET 4.8, .NET Core, or whatever.
Is it possible to configure the above using the JS SDK, or am I going to have find another approach?
Update 23/03/21
Untested, but these are my findings so far:
App Service Plan - The plan is set using the serverFarmId
property of the Site
interface.
Operating system - Assuming Windows as the default, if you want a Linux app service, you change the kind
property of Site
from app
, to app,linux
.
Stack & version - In the SiteConfig
interface, you have linuxFxVersion
and windowsFxVersion
. Again, I think the assumption is 'latest .NET' (e.g. .NET 4.8). For .NET Core 3.1, the setting looks to be DOTNETCORE|3.1
.