I am creating a Azure ARM template to provision VMs based on the environmnet type; so created an array type parameter as below,
"EnvironmentType": {
"type": "array",
"defaultValue": [
"Dev",
"Test",
"PreProd",
"Prod"
]
},
But on Azure portal this parameter is rendered as textbox with comma separated values as shown in below screenshot.
How to get this parameter displayed as dropdown?
As bmoore-msft mentioned we could replace the
defaultValue
withallowedValues
andarray
withstring
. We also could set the dropdownlist default value from the template. In your case, please have a try to use the following code. More details we could refer to the Customize the template.