Skip to content

Create approle with vault_write module #278

Answered by briantist
dil-kpogany asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @dil-kpogany , welcome!

Do you mean initial creation of the approle? I haven't tried that myself but I think it would be possible, yes.

vault_write is essentially an HTTP POST to the given path, so as long as the APIs needed use POST you should be able to do it.

The relevant docs for that are in Vault's HTTP API docs:
https://www.vaultproject.io/api-docs/auth/approle#create-update-approle

So based on that, I think you can vault_write to the path auth/approle/role/:role_name to do the creation. The data would be a dict of the parameters listed on that page.

Let me know if that works for you!


Also, I expect that eventually we'll have a dedicated plugin/module for that, but it will requi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dil-kpogany
Comment options

Answer selected by dil-kpogany
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants