-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
provider/rundeck: Added multiple functionality. #8314
Conversation
Working code i currently use in production. resource "rundeck_job" "my_job_name" {
name = "My Job Name"
description = "${file("${path.module}/scripts/description")}"
project_name = "${rundeck_project.rundeck_project.name}"
preserve_options_order = true
node_filter_query = "${file("${path.module}/scripts/filter_query")}"
max_thread_count = 10
nodes_selected_by_default = true
allow_concurrent_executions = false
continue_on_error = false
dispatch {
continue_on_error = true
}
option {
name = "Option"
description = "${file("${path.module}/scripts/option_description")}"
default_value = "status"
value_choices = ["pulled","open","merged"]
required = true
require_predefined_choice = true
}
command {
inline_script = "${file("${path.module}/scripts/inline_script")}"
description = "Command Description"
}
} |
if len(scheduleCron) > 0 { | ||
scheduleCronArray := strings.Split(scheduleCron, " ") | ||
if len(scheduleCronArray) != 7 { | ||
return nil, fmt.Errorf("rundeck schedule_cron format is incorrect") |
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.
Could we use a ValidateFunc
on the schedule_cron
attribute for this? If we do the validation there then Terraform can detect it during the "plan" step in some cases (as long as it doesn't contain any interpolation expressions).
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.
I came back of my opinion, yes we can put MaxItems on the element, this will trigger the validation on the plan step.
Thanks for this, @BobVanB! I merged the upstream client library change, and I left an initial comment here for now, but generally this looks good so far. Let me know when you're done here, and if you need any help with the acceptance tests or docs. |
@apparentlymart I will pick this up monday, thnx for the review. |
Do you mean something like this? |
Added documentation and an advanced acceptance test. |
` |
Schema has a MaxItems for List elements, will test en add this tomorrow. |
@apparentlymart I think this one can be reviewed and is ready for merging. |
I have another idea, but that has to be separate from this pull. |
I see that i dont have the latest go-rundeck-api version, updating it and then i will remove the wip |
Currently adding errorhandling functionality. |
Hi @BobVanB! I do intend to review this in more detail soon, but I just wanted to make a general note now: it seems like this patch is becoming quite a large set of changes, and the larger it gets the more complicated it will be to review. When possible it's preferable for each PR to add one specific feature so that it can be reviewed and merged in isolation from the rest. I certainly don't want to discourage your momentum here, since there's some good stuff! Just want to make sure we can get this stuff merged efficiently, rather than going back and forth on many small details in a large patch. |
Yeah I firgure that, was feeling the same. The last one errorhandling changes alot of code. Also still dont like that booleans are always present, there should be a third type for it "nil" |
For now added yet another feature, ^^ have to wait for the api first :P |
provider/rundeck: Added multiple functionality: * schedule * descriptions * storagepath * scriptinterpreter * nodesSelectedByDefault * scriptinterpreter * nodefilterbydefault * notification * etc... With an accaptance test and documents.
@apparentlymart After i checken out the boolean bug. I will cut this one Into smaller party. |
Splitting this merge into multiple merges. closing this one. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Added multiple functionality: schedule, descriptions, storagepath, scriptinterpreter, nodesSelectedByDefault, scriptinterpreter, nodefilterbydefault
Terraform plan is now clean, so only changes you made are seen.
UseCase: Changeing all our manual rundeck code to terraform, and missing some features in the process.
Still waiting for pull request on go-rundeck-api:
apparentlymart/go-rundeck-api#9