Azure / Azure/azure-cli

az webapp up - second app in plan doesn't work due to `--runtime` parameter failure

Open
#25,743 2 comments 0 reactions 1 assignee Assigned to @seligj95 View on GitHub
act-observability-squad app-service-webapp-up Auto-Assign Service Attention Web Apps
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62

1. First command to create plan on correct (Windows) os is:

```
az webapp up --resource-group myAuthResourceGroup --name frontend-diberry-win-16 --plan myPlan --sku FREE --os-type Windows --location "West Europe" --runtime "NODE:16LTS"
```

2. Second command fails with same `--runtime` syntax:

```
az webapp up --resource-group myAuthResourceGroup --name backend-diberry-win-16 --plan myPlan --runtime "NODE:16LTS"
```

Error is: `Linux runtime 'NODE|16LTS' is not supported. Please check supported runtimes with: 'az webapp list-runtimes --os Linux'`

Issue: why does it think the plan is Linux when the 1st command stated the os type for Windows and the returned JSON shows the os as Windows. See Screenshot below.

If I add the correct OS to the command, I get an error about location:

```
az webapp up --resource-group myAuthResourceGroup --name backend-diberry-win-16 --plan myPlan --runtime "NODE:16LTS" --os-type Windows
```

The only way to get it to work is to then specify the location

```
az webapp up --resource-group myAuthResourceGroup --name backend-diberry-win-16 --plan myPlan --runtime "NODE:16LTS" --os-type Windows --location "West Europe"
```

Isn't the point of az webapp up that if the information can be derived/assumed from the plan that I don't have to enter it?

Don't have to add these params for Linux OS

```
az webapp up --resource-group myAuthResourceGroup-lin --name frontend-diberry-lin-16 --plan myPlan-lin --sku B1 --location "West Europe" --os-type Linux --runtime "NODE:16-lts"

az webapp up --resource-group myAuthResourceGroup-lin --name backend-diberry-lin-16 --plan myPlan-lin --runtime "NODE:16-lts"
```

Why are the operating system not sharing the runtime values? They are completely different in case and syntax.

**Related command**

**Describe the bug**

**To Reproduce**

**Expected behavior**

**Environment summary**

**Additional context**
![image](https://user-images.githubusercontent.com/41597107/224185611-1ecfb98b-f3f2-454a-bbaf-3a9523bcc5fe.png)

![image](https://user-images.githubusercontent.com/41597107/224186938-d5311601-1fc1-417d-bcb2-c5ecc3cbcb04.png)

![image](https://user-images.githubusercontent.com/41597107/224187217-f4a9d2bf-0e40-4ec3-b7c5-dc71aa52f97a.png)

Don't have to add these params for Linux OS

![image](https://user-images.githubusercontent.com/41597107/224190250-57f7a438-32af-41de-9ff7-947d79b8333a.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.