Skip to content

Instantly share code, notes, and snippets.

@krnese
Created October 30, 2018 11:07
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 krnese/3c8af533f48b25e9ca11411956698b12 to your computer and use it in GitHub Desktop.
Save krnese/3c8af533f48b25e9ca11411956698b12 to your computer and use it in GitHub Desktop.
greater condition
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"foo": {
"type": "object",
"defaultValue": {
"vnetName": 0,
"vnetAddressPrefix": "10.1.0.0/20",
"dnsServers": [
]
}
}
},
"resources": [
{
"condition": "[greater(length(parameters('foo').dnsservers),0)]",
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2017-10-01",
"name": "lkjl2kjfr",
"location": "[resourceGroup().location]",
"kind":"StorageV2",
"sku": {
"name":"Standard_GRS"
}
}
],
"outputs": {
"fooObject": {
"type": "bool",
"value": "[greater(length(parameters('foo').dnsservers),0)]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment