Skip to contents

Vault: Gets the secret id for the approle registered in vault e.g.(jenkins).

Usage

get_secret_id(url, role_name, token)

Arguments

url

URL of the HashiCorp Vault instance.

role_name

name of the role in your Vault instance.

token

token from your user/github/etc... login method. Note: the user/github/etc auth method this token is from must have access to work with approles in Vault

Value

Return's the secret id that allows an individual to query secrets in Vault via the approle method.

Details

This function obtains the secret id for the approle from Vault. The user can then utilize the secret id retrieved to obtain the approle token from Vault. You will need the URL of the HashiCorp Vault you are using the role name in vault and a token from an auth path in Vault.

Examples

if (FALSE)   get_secret_id(url='vautl-url.com',role_name='jenkins',token='12345abcdef')