-
Notifications
You must be signed in to change notification settings - Fork 103
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 support for nomad 0.9.3 update stanza "auto_promote" property #68
Conversation
Thanks for this, will look at it when I get back to work next week. |
@cgbaker What is the status here? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, @transferkraM. I don't believe this is going to work without updating the dependency on the Nomad API client. Please add tests to document that this capability (job datasource only) works as expected.
@@ -885,6 +886,7 @@ resource "nomad_job" "test" { | |||
healthy_deadline = "6m" | |||
progress_deadline = "11m" | |||
auto_revert = true | |||
auto_promote = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test was looking at new config for the 0.9.0 API... auto_promote
should be part of a separate test for 0.9.3. such a test should verify that this option is successfully being submitted to Nomad.
@@ -1603,6 +1603,7 @@ func parseUpdate(result **api.UpdateStrategy, list *ast.ObjectList) error { | |||
"healthy_deadline", | |||
"progress_deadline", | |||
"auto_revert", | |||
"auto_promote", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the api.UpdateStrategy
object that this attempting to parse into doesn't have an AutoPromote
field, because the dependency version for the Nomad API needs to be updated.
"auto_promote": { | ||
Type: schema.TypeBool, | ||
Computed: true, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a test to datasource_nomad_job_test.go
to test this is working; i don't believe that it is.
I made a pr against his fork that makes this functionality work for my use case(updating the dependencies). https://github.com/transferkraM/terraform-provider-nomad/pull/1 @cgbaker can you expand how i can make the test for different versions or point me to the docs that let me know how I can do it? This is a useful feature that i would like merged |
Update nomad dependency
Thanks @AndrewScibek. I'll take a look at this. |
Any update on this PR? Looking forward to using this. |
No description provided.