title: Azure Functions, CosmosDB Trigger: How to store connection string in keyvault
body: <p>The skeleton code for a CosmosDB triggered function is:</p>
  
  <pre><code>[CosmosDBTrigger(
              databaseName: "databaseName",
              collectionName: "collectionName",
              ConnectionStringSetting = "string",
              LeaseCollectionName = "leases")]
  </code></pre>
  
  <p><code>ConnectionStringSetting</code> is limited to being an AppSetting here.  I would like to go to key vault to grab this secret.</p>
  
  <p>The comments for the attribute suggest that there is a way using CosmosDBOptions:</p>
  
  <pre><code>    /// Optional. A string value indicating the app setting to use as the CosmosDB connection string, if different
      /// than the one specified in the &lt;see cref="CosmosDBOptions"/&gt;.
  </code></pre>
  
  <p>but it's not clear how to use that class within the context of an Azure Function.</p>
  
  <p>Is this possible?</p>