Skip to content

Instantly share code, notes, and snippets.

@jeffhollan
Created November 28, 2018 20:02
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 jeffhollan/01dadc62b5b54a3cec585744682a42f3 to your computer and use it in GitHub Desktop.
Save jeffhollan/01dadc62b5b54a3cec585744682a42f3 to your computer and use it in GitHub Desktop.
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.Extensions.Logging;
namespace KeyVault
{
public static class MyFunctionClass
{
private static string superSecret = System.Environment.GetEnvironmentVariable("SuperSecret");
[FunctionName("MyFunction")]
public static void Run([EventHubTrigger("eventhub", Connection = "EventHubConnectionString")]string myEventHubMessage, ILogger log)
{
// DISCLAIMER: Never log secrets. Just a demo :)
log.LogInformation($"Shhhhh.. it's a secret: {superSecret}");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment