To be able to login to vault we have an option to pass env VAULT_ADDR and VAULT_TOKEN. but in our organization, we have the github authentication enabled and we login to vault using our github_tokenand the ask is there to create env GITHUB_TOKEN and GITHUB_USERNAME to be able to authenticate and retrieve the list of secrets we want from vault by using terraform vaulr provider
Description
To be able to login to vault we have an option to pass env
VAULT_ADDR
andVAULT_TOKEN
. but in our organization, we have the github authentication enabled and we login to vault using ourgithub_token
and the ask is there to create envGITHUB_TOKEN
andGITHUB_USERNAME
to be able to authenticate and retrieve the list of secrets we want from vault by using terraform vaulr providerPotential Terraform provider setup
For example, we could do this
And of course we need the following envs
And after that
Use case
The GitHub Actions already has
GITHUB_TOKEN
this env defined in the workflow. We could onboard the actions to retrieve the securely of the secret in the vault and do any terraform deployments https://docs.github.com/en/actions/security-guides/automatic-token-authentication