-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move the generation of vault credentials from ansible to terraform #84
Comments
While deploying a module you might have the token from Vault with limited access rights. Like only "read" capabilities.
I would suggest avoiding coupling between |
As an additional idea, we could think about a separate module(s) for managing:
or
Policies exist in separate contexts for each module, you have the opportunity to map policies with roles and make tokens via The same idea for
|
We just had a discussion about this, here's my takeaway: We both agree that putting something like this inside the presto-module is not necessarily a good thing, because this is not a "presto"-thing, meaning it doesn't belong in the presto-module. Therefore, Nikita's suggestion of putting the creation of secrets (and potentially other features) into its own terraform module makes a lot of sense. The same goes for the creation of intentions as well, which should potentially also be its own module. However, in the context of the system we are about to use this module in, it might be beneficial to have some simple code bundled with the module that creates secrets in vault. This all depends on whether we will have to create our own credentials or not. |
when all that is said and done, why don't we just create a tiny module that takes a path and keys as input, and create random strings, and output their paths? Maybe an hour of work, not even that |
I would like to start POC'ing a little on this one, so I can get my head around our credentials and policies |
Feature description
I suggest we move the whole generation of secrets used in the module over to the module itself, and remove it from the ansible scripts. The ansible scripts are not part of the module, meaning anyone using our module would need to create secrets in their vault before using this. We could still keep all the funtionality we have now, of being able to use user-provided secrets, as well as setting a custom path to the vault secrets, but also bundle in a creation and usage of secrets in vault with the module itself.
Why is it needed?
User experience
Suggestion(s)/solution(s) [Optional]
Take this part, and convert it to terraform code
https://github.com/fredrikhgrelland/terraform-nomad-presto/blob/6fbb7ae2e50cd6c06fab59526ef6a103872aaaae/dev/ansible/00_generate_secrets_vault.yml#L1-L10
Using the vault provider
Definition of done
Ansible code to generate secrets is moved into the terraform code in the module itself
All existing features are kept
Checklist (after created issue)
The text was updated successfully, but these errors were encountered: