Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Yvand opened this issue Sep 9, 2021 · 0 comments
Open

Comments

@Yvand
Copy link
Contributor

Yvand commented Sep 9, 2021

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:

{
  "$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 https://portal.azure.com/#create/Microsoft.Template/.

Picture of the issue (parameter boolParam2 is not set):
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants