rundeck/terraform-provider-rundeck

rundeck_job node selection default

mengesb opened this issue · 1 comments

The default for node selection in a job insertion to Rundeck appears to be The user has to explicitly select target nodes', which really sucks. By default, if a node filter is given, it should default to Target nodes are selected by default`

The provider appears to be unaware of this setting, so manually changing it in several jobs doesn't result in terraform detecting changes

Terraform Version

0.9.6

Affected Resource(s)

Please list the resources as a list, for example:

  • rundeck_job

Terraform Configuration Files

resource "rundeck_job" "app_build" {
  allow_concurrent_executions = "true"
  description                 = "Update app with new build version and run chef-client"
  group_name                  = "app"
  max_thread_count            = "5"
  name                        = "Set build for app and deploy"
  preserve_options_order      = true
  node_filter_query           = "hostname:ec2us-app.*"
  project_name                = "project"

  command {
    inline_script = "${file("${path.module}/files/appversion.bash")}"

      script_file_args = "-V \"$${option.version}\""
  }

  lifecycle {
    ignore_changes = ["max_thread_count","rank_order"]
  }

  option {
    value_choices_url         = "${build_api}/app"
    description               = "attribute value"
    exposed_to_scripts        = "true"
    name                      = "version"
    require_predefined_choice = "false"
    required                  = "true"
  }
}

Debug Output

N/A

Panic Output

N/A

Expected Behavior

Should have an option in rundeck_job or a default behavior to set the node selection method

Actual Behavior

All jobs executing against nodes default to 'The user has to explicitly select target nodes'

Steps to Reproduce

  1. Create a remote-execution rundeck job using rundeck_job resource
  2. View the job details in Rundeck, scroll down to Node selection
  3. Observe setting as 'The user has to explicitly select target nodes'
  4. Change to 'Target nodes are selected by default'
  5. terraform apply
  6. Terraform reports no change

Important Factoids

N/A

References

N/A

Please try to recreate this issue on the current Terraform and provider version. If you still have trouble open a new issue with steps to reproduce please. I think it was fixed in #73