Skip to content

A collection of example code snippets demonstrating the various ways to use the HashiCorp Vault client libraries.

License

Notifications You must be signed in to change notification settings

hashicorp/vault-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vault Examples

A collection of copy-pastable code example snippets demonstrating the various ways to use the Vault client libraries for various languages to authenticate and retrieve secrets.

How To Use

Find the relevant file inside the designated directory for the language of your choice, and paste the example code into your application. (This repo is not intended to be "run" as a standalone application.)

Dotnet

These examples use the community maintained library: VaultSharp

Go

These examples use the HashiCorp maintained client library: HashiCorp Vault

How To Contribute

If you would like to submit a code example to this repo, please create a file containing one function (or a grouping of several related functions) in the language-appropriate directory.

We create the examples as functions so that they may be easily tested. When adding a code example, it may also be worth creating a test that calls the function(s). You can use the environment variable EXPECTED_SECRET_VALUE for comparison in your tests. If you're adding some code in a new language, you will need to do some extra work to add the proper test setup to the CI script, including setting any required environment variables.

About

A collection of example code snippets demonstrating the various ways to use the HashiCorp Vault client libraries.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published