Created
November 28, 2018 20:02
-
-
Save jeffhollan/01dadc62b5b54a3cec585744682a42f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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