Azure / Azure/azure-devtestlab

Portal does not set the default value of bool parameters if it is false

Open
#797 0 comments 0 reactions 0 assignees View on GitHub
az.devtestlabs bug
Dominant language
PowerShell
Stars
465
Forks
595
PR merge metrics
No merged PRs in 30d

Description

When creating an environment from an ARM template using the DevTest Labs portal, the default value of bool parameters is not set if `defaultValue` is `false` (it works fine if `defaultValue` is `true`).

This example allows to reproduce the issue:

```json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"boolParam1": {
"type": "bool",
"defaultValue": true,
"metadata": {
"description": "Portal will set the default value to true as expected."
}
},
"boolParam2": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "Portal will not set the default value."
}
}
},
"variables": {
},
"resources": [
],
"outputs": {
}
}
```

The default value is always set as expected when loading the template with .

Picture of the issue (parameter `boolParam2` is not set):
![image](https://user-images.githubusercontent.com/8788631/132640386-7b4d2047-3334-40a5-98af-24f248b96bc1.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.