title: Arm Template conditional output parameters
body: <p>I have an ARM template which conditionally creates a resource:</p>
  
  <pre><code>    {
    "type": "Microsoft.Storage/storageAccounts",
    "sku": {
      "name": "Standard_GRS",
      "tier": "Standard"
    },
    "kind": "BlobStorage",
    "name": "[variables('storageAccounts_name')]",
    "condition": "[equals(parameters('is_Not_Development'), 'True')]",
    "apiVersion": "2017-06-01",
    "location": "[resourceGroup().location]",
    "scale": null,
    "properties": {
      "accessTier": "Hot"
    },
    "dependsOn": []
  },
  </code></pre>
  
  <p>In my output parameters I have the following which causes an error if the resource is not created:</p>
  
  <pre><code>    "storageAccountConnectionString": {
    "type": "string",
    "value": "[Concat('DefaultEndpointsProtocol=https;AccountName=',variables('StorageAccounts_name'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('StorageAccounts_name')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).keys[0].value)]"
  },
  </code></pre>
  
  <p>I have tried this:</p>
  
  <pre><code>    "storageAccountConnectionString": {
    "type": "string",
    "condition": "[equals(parameters('is_Not_Development'), 'True')]",
    "value": "[Concat('DefaultEndpointsProtocol=https;AccountName=',variables('StorageAccounts_name'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('StorageAccounts_name')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).keys[0].value)]"
  },
  </code></pre>
  
  <p>with the condition clause but this is not recognised. How can I make the output parameter conditional?</p>
  
  <p>UPDATE:</p>
  
  <p>I have tried the following:</p>
  
  <pre><code>    "storageAccountConnectionString": {
    "type": "string",
    "value": "[if(equals(parameters('is_Not_Development'),'False'),'null',Concat('DefaultEndpointsProtocol=https;AccountName=',variables('StorageAccounts_name'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('StorageAccounts_name')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).keys[0].value))]"
  },
  </code></pre>
  
  <p>but it gives me the same error message, it must be evaluating both true and false conditions.</p>