-
Notifications
You must be signed in to change notification settings - Fork 101
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 setting dynamic node metadata #485
Comments
Hello @Kamilcuk than you for taking the time to propose some improvements. Can you expand a little bit more on what you want to achieve? How is terraform involved in your proposal? Having a better understanding on what is your need helps us come up with better solutions. Also feel free to implement it and open a PR, we will be happy to review it. |
Hi @Juanadelacuesta . Please feel free to ask me more questions. Nomad allows setting node dynamic metadata using /v1/client/metadata endpoint documented here https://developer.hashicorp.com/nomad/api-docs/client#update-dynamic-node-metadata . That is not possible to provision from terraform using this plugin. I am proposing to add such functionality.
Ideally, I would want to achieve the following resource. I am proposing to name the resource
Terraform, when applying such resource, would execute The resource would support the following arguments:
Terraform is the tool that this plugin is written for. It is involved in such a way, that once this proposal would be implemented, terraform would be able to use this plugin to provision dynamic Nomad node metadata. Please kindly ask more questions if there are any confusion. ( Additionally, it would be nice to have a |
Hello @Kamilcuk! Adding and updating a node's metadata on the fly is a good idea, but terraform might not be the best tool to do so, values like the node ID are dynamic and meant to be replaceable, the terraform resource is supposed to represent nodes, not a particular node, and using it to do can lead you to unmaintainable configurations. In the meantime we recommend a scrip or even a nomad batch job, hopes this help you! |
Proposal
Please add manipulating of dynamic Nomad node metadata.
nomad_node_meta
It would be great, if terraform would only modify the metadata mentioned in configuration without touching metadata set manually. So kind of work like incremental on top of existing dynamic metadata, instead of wiping all existing dynamic metadata and replacing them all. This could be an option, for example.
Use-cases
The use case is when you want to do exactly that - change Nomad node metadata.
Attempted Solutions
Python scripts using https://developer.hashicorp.com/nomad/api-docs/client#update-dynamic-node-metadata
https://developer.hashicorp.com/nomad/docs/commands/node/meta
Thanks!
The text was updated successfully, but these errors were encountered: