Skip to content
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

Feature Request: Add a resource for bootstrapping Nomad ACL #301

Open
guifran001 opened this issue Jan 6, 2023 · 2 comments
Open

Feature Request: Add a resource for bootstrapping Nomad ACL #301

guifran001 opened this issue Jan 6, 2023 · 2 comments

Comments

@guifran001
Copy link

guifran001 commented Jan 6, 2023

Using the BootstrapOpts() method of the client API, a resource could be created to bootstrap Nomad ACL and retrieve the Secret ID.

It would be simpler and nicer than calling the CLI and retrieve the stdout when setting up a Nomad Cluster.

Would it be a good idea ?

My use case is that I'm using a custom Pulumi provider to deploy nomad as a Windows Service on bare metal and I would like to be able to bootstrap the ACL as well.

This resource would not do anything on Update or on Delete; I would let the bootstrap reset manual. For my use case, the resource would belong to the same stack than the one installing Nomad.

resource "nomad_acl_bootstrap_token" "bootstrap" {
  name            = "bootstrap"
  bootstrap_token = ""
}

output "nomad_token" {
  value = nomad_acl_bootstrap_token.bootstrap.secret_id
}

If one is passing a bootstrap token on creation and change it, it would be only ignored.

Does anyone think of any major flaw with this feature ? (I could open a pr if no one sees a big flaw to manage that as a resource)

@lgfa29
Copy link
Contributor

lgfa29 commented Jun 3, 2023

Hi @guifran001 👋

This could be very handy. @lhaig started working on something like this but didn't have time to finish. If you feel like picking up the work the branch is f-bootstrap-token.

Our main concern would be having the root token stored in state, but keep state safe is already mandatory for using Terraform, so I think we just need to document this properly 🙂

@xsvil
Copy link

xsvil commented Nov 12, 2024

This would be very useful. Is it planned to be merged soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants