Skip to content

Here is an example of how I would the different vault providers

License

Notifications You must be signed in to change notification settings

Jacobbrewer1/vault-provider-examples

Repository files navigation

Vault Provider Examples

Setup

To run the examples you will need to have a Vault server running as well as the MySQL database. I have included a docker-compose.yml file which will start the Vault server and the MySQL database. To start the services run the following command:

docker-compose up -d

Now that the services are running, we need to set up the configuration on Vault. To do this we need to run the following steps:

  1. Run Terraform against the Vault Docker container to set up the initial configuration:
cd terraform/env && terraform init && terraform apply
  1. Now run the example application to set up the database and the Vault secrets:
cd cmd/database && go build -o db-example && ./db-example
  1. Now the example is running you can watch the logs to see the application running. The logs will show that the Vault lease is being renewed every 15 seconds. We would increase this time in a production environment.

About

Here is an example of how I would the different vault providers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published