Azure / Azure/azure-cli

Webapp slots does not clone the runtime from the production slot with --configuration-source parameter

Open
#17,055 11 comments 0 reactions 1 assignee Claimed by @seligj95 View on GitHub
act-observability-squad app-service-slots Service Attention triage Web Apps
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Describe the bug**
The app slot defaults to .net framework 4.8 (because 4.8 is the default of az webapp list-runtimes I guess) even though the runtime version of production slot is set to "DOTNETCORE|3.1".

I am hosting an app service with Windows and when I try to create a slot with following command:
```
az webapp deployment slot create `
--name $appName `
--resource-group $rgName `
--slot $slotName `
--configuration-source $appName `
```
It does not copy the runtime. This would not bother me that much if there was a possibility to change the runtime for a deployment slot after creating it, but I cannot figure out a way to do either. Is there a way to copy the runtime or eventually set it directly on the created slot?

**To Reproduce**
```
az webapp create `
--resource-group $rgName `
--name $appName `
--plan $planId `
--runtime '"DOTNETCORE|3.1"'
az webapp deployment slot create `
--name $appName `
--resource-group $rgName `
--slot $slotName `
--configuration-source $appName `

```
**Expected behavior**
I expect the runtime in the new slot to be the same as the production slot.

**Environment summary**
{
"azure-cli": "2.17.1",
"azure-cli-core": "2.17.1",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"azure-devops": "0.17.0"
}
}
OS: Windows 10
Shell type: Powershell 5.1

**Additional context**
I have tried to set the --windows-fx-version, to no success, and it makes sense since the documentation says:
"A docker image name used for your windows container web app, e.g., microsoft/nanoserver:ltsc2016."

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.