-
Notifications
You must be signed in to change notification settings - Fork 100
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
Add nomad_job_v2 resource using terraform-plugin-go #238
Conversation
This is a very interesting and important work. This would mean that the TF PLAN could show only the differences but not a huge string with "+" and "-" in some lines... Any chance to get this PR reviewed? Thanks for this good work @remilapeyre ! |
Despite @remilapeyre brave efforts, this approach turned out to be impossible to manage over time as it requires keeping the Terraform spec for jobs in sync with Nomad. We should investigate the advancements in the Terraform plugin development ecosystem to come up with a better solution to #1. Thank you again @remilapeyre for all the hard work on this! |
Hi @lgfa29 just came here to comment, something we did, (needs improvement, but maybe it's a good starting point for this). We made a nomadpack provider, an example resource is something like this:
Under the hood currently this calls the nomad-pack binary to deploy the pack. Having this allows us to chain resources (create a policy and then deploy the job) in the same terraform configuration. We detect changes by having a shasum of the rendered job and seeing if it changes with the value stored for the previous resource version. Also if, the nomad-pack plan has changes, we output them in the terraform diagnostics. It's a bit hacky solution but I didn't find another way of getting the plan output displayed nicely.
What do you thing about an approximation like this? Using a nomadpack resource we wouldn't need to keep track of the changes in the nomad job spec. Also having nomadpack integrated in terraform will allow to create dependencies and handle everything inside terraform. |
Hi @jorgemarey 👋 Thanks for the input. We have received questions about a Nomad Pack + Terraform integration, but we haven't nailed down a design for that quite yet. Would you mind moving this comment to a new issue so we can track it and discussed it more broadly? Thank you! |
Created in #409 |
No description provided.