Azure / Azure/bicep-types-az

appservice:How to configure runtime stack for app service in bicep script to create appservice in windows os

Open
#1,935 2 comments 0 reactions 0 assignees View on GitHub
App Services Service Attention
Dominant language
TypeScript
Stars
108
Forks
44
Avg merge
18h 53m
Merged PRs (30d)
29

Description

### Resource Type

app service

### Api Version

Microsoft.Web/sites@2022-09-01

### Issue Type

Property(s) do not have expected effect on deployment

### Other Notes

How to configure runtime stack for app service in bicep script to create appservice in windows os

I am able to create appservice but run time stack is not reflecting.

I want the runtime stack of web appservice to be Node - ~18 and runtime stack of webapp-api appservice as Dotnetcore

However, what I'm trying to create is more in line with the screenshots I provided below, where I created the app services manually. And I want to create bicep script which will create app services in other environments with the same runtime stack as below:
![image](https://github.com/Azure/bicep-types-az/assets/149995585/21930d26-35a0-419f-9b72-80e830c12931)

#1661 #1738 #appserviv

### Bicep Repro

resource appserviceplan 'Microsoft.Web/serverfarms@2022-09-01' = {
name: 'appserviceplan1'
location: location
sku: {
name: 'S1'
capacity: 1
}
}

resource appserviceapi 'Microsoft.Web/sites@2022-09-01' = {
name: 'appservice-webapp-api1'
location: location
properties: {
serverFarmId: resourceId('Microsoft.Web/serverfarms', appserviceplan.name)
siteConfig: {
appSettings: [
{
name: 'FUNCTIONS_WORKER_RUNTIME'
value: 'dotnet'
}
]
}
}
dependsOn: [
appserviceplan
]
}

resource appservice 'Microsoft.Web/sites@2022-09-01' = {
name: 'appservice-webappservice-app1'
location: location
properties: {
serverFarmId: resourceId('Microsoft.Web/serverfarms', appserviceplan.name)
siteConfig: {
appSettings: [
{
name: 'WEBSITE_NODE_DEFAULT_VERSION'
value: '~18'
}
]
}
}
dependsOn: [
appserviceapi
]
}

### Confirm

- [X] I have read the troubleshooting guide and looked for duplicates.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Microsoft.Web/sites@2022-09-01 resources in the supplied Bicep repro and inspect how siteConfig and appSettings represent Windows Node and .NET runtime settings. Done means a deployment creates both app services with Node ~18 and Dotnetcore runtime stacks matching the manual configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.