vault-action
vault-action copied to clipboard
[BUG] Vault-action does not support authentication only usage
Describe the bug
I want to use vault-action only to authenticate to vault instance with an approle, and generate a VAULT_TOKEN
to use with Terraform and vault-provider, and without retrieve secrets. But vault-action require to specify secrets.
To Reproduce Use vault-action without secrets :
- name: Authenticate to Vault
uses: hashicorp/[email protected]
with:
url: https://my-vault-instance
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
exportToken: true
Expected behavior
vault-action
should authenticate and produces a masked environment variable VAULT_TOKEN
.
Log Output
Error: Input required and not supplied: secrets
Additional context N/A
@Ameausoone One way to trick this would be to do a look-up self: https://www.vaultproject.io/api-docs/auth/token#lookup-a-token-self.
We should definitely have support for exporting tokens only, though!
Is this a duplicate of https://github.com/hashicorp/vault-action/issues/289, which is now solved by https://github.com/hashicorp/vault-action/pull/299 (and released in https://github.com/hashicorp/vault-action/releases/tag/v2.4.1) ?
Yep, looks like this was solved in #299. Thanks!