How do I go about creating an azure WebApp that I ...
# azure
w
How do I go about creating an azure WebApp that I can deploy to using the CLI in the simplest possible way? Right now I do this (but it doesn't work):
Copy code
const app = new azure.web.WebApp(
      name,
      {
        resourceGroupName: resourceGroupName,
        serverFarmId: servicePlanName,
        siteConfig: {
          netFrameworkVersion: "v8.0",
          appSettings: [
            {
              name: "CONNECTION_STRING",
              value: connectionString,
            },
          ],
        },
      },
      azureOptions
    );

    const meta = new WebAppMetadata(
      name + "-metadata",
      {
        resourceGroupName: resourceGroupName,
        name: app.name,
        properties: {
          CURRENT_STACK: "dotnetcore",
        },
      },
      azureOptions
    );
My goal is to later deploy with the az cli like
Copy code
az webapp deployment source config-zip --name web-appe20fa5b0 --resource-group rg-name --src publish.zip
Any ideas or pointers? I thought that would be an easy thing to do :D
found some resources it is the.
CURRENT_STACK
that should set the current runtime stack, but it is always blank for me.
Once you know how to do it it is easy. With a
siteConfig
like the following it works:
Copy code
siteConfig: {
          netFrameworkVersion: "v8.0",
          linuxFxVersion: "DOTNETCORE|8.0",
          appSettings: [
            {
              name: "CONNECTION_STRING",
              value: connectionString,
            },
          ],
        },