Skip to content

Instantly share code, notes, and snippets.

@KacperMucha
Created August 2, 2017 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KacperMucha/c49a0e1e22a94b37b0be5bbba505bae0 to your computer and use it in GitHub Desktop.
Save KacperMucha/c49a0e1e22a94b37b0be5bbba505bae0 to your computer and use it in GitHub Desktop.
ARM template if example
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"changeVariable": {
"type": "string",
"defaultValue": "yes",
"allowedValues": [
"yes",
"no"
]
}
},
"variables": {
"var1": "defaultValue"
},
"resources": [],
"outputs": {
"equalsOutput": {
"type": "bool",
"value": "[equals(parameters('changeVariable'), 'yes')]"
},
"output": {
"type": "string",
"value": "[if(equals(parameters('changeVariable'), 'yes'), variables('var1'), 'changedValue')]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment