Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DustinVenegas/3d12d036a93192dc0fed1b5e7b83217d to your computer and use it in GitHub Desktop.
Save DustinVenegas/3d12d036a93192dc0fed1b5e7b83217d to your computer and use it in GitHub Desktop.
ARM template convert to bool
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0",
"parameters": {
"authActiveDirectoryClientId": {
"type": "string",
"defaultValue": ""
}
},
"variables": {
"convertToBool": [
false,
true
],
"authEnabled": "[variables('convertToBool')[length(take(parameters('authActiveDirectoryClientId'), 1))]]"
},
"resources": [],
"outputs": {
"authEnabled": {
"value": "[variables('authEnabled')]",
"type" : "bool"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment