Rundeck Provider: rundeck_job doesn't have idempotency
hashibot opened this issue · 0 comments
hashibot commented
This issue was originally opened by @jamielennox1 as hashicorp/terraform#8677. It was migrated here as part of the provider split. The original body of the issue is below.
Terraform Version
Terraform v0.7.3
Affected Resource(s)
- rundeck_job
Terraform Configuration Files
resource "rundeck_job" "example" {
name = "example"
project_name = "test"
description = "Testing idempotency"
group_name = "Terraform"
allow_concurrent_executions = "false"
option {
name = "instance_count"
default_value = "2"
required = "true"
value_choices = ["1,2,3,4,5,6,7,8,9"]
require_predefined_choice = "true"
}
command {
shell_command = "echo hello"
}
}
Debug Output
+ rundeck_job.example
allow_concurrent_executions: "false"
command.#: "1"
command.0.shell_command: "echo hello"
command_ordering_strategy: "node-first"
description: "Testing idempotency"
group_name: "Terraform"
log_level: "INFO"
max_thread_count: "1"
name: "example"
option.#: "1"
option.0.default_value: "2"
option.0.name: "instance_count"
option.0.require_predefined_choice: "true"
option.0.required: "true"
option.0.value_choices.#: "1"
option.0.value_choices.0: "1,2,3,4,5,6,7,8,9"
project_name: "test"
rank_order: "ascending"
data.aws_availability_zones.available: Refreshing state...
rundeck_job.example: Creating...
allow_concurrent_executions: "" => "false"
command.#: "" => "1"
command.0.shell_command: "" => "echo hello"
command_ordering_strategy: "" => "node-first"
description: "" => "Testing idempotency"
group_name: "" => "Terraform"
log_level: "" => "INFO"
max_thread_count: "" => "1"
name: "" => "example"
option.#: "" => "1"
option.0.default_value: "" => "2"
option.0.name: "" => "instance_count"
option.0.require_predefined_choice: "" => "true"
option.0.required: "" => "true"
option.0.value_choices.#: "" => "1"
option.0.value_choices.0: "" => "1,2,3,4,5,6,7,8,9"
project_name: "" => "test"
rank_order: "" => "ascending"
rundeck_job.example: Creation complete
~ rundeck_job.example
allow_concurrent_executions: "true" => "false"
max_thread_count: "0" => "1"
preserve_options_order: "true" => "false"
rank_order: "" => "ascending"
Expected Behavior
I should be able to apply the rundeck_job multiple times without any changes.
Actual Behavior
After applying the changes it'll try and change allow_concurrent_executions
(which was previously specified to be false), max_thread_count
, preserve_options_order
, and rank_order
.
After applying several times the same arguments will still appear.
rundeck_job.example: Refreshing state... (ID: 7cafe700-47d3-4091-9249-65e21d3ee394)
data.aws_availability_zones.available: Refreshing state...
rundeck_job.example: Modifying...
allow_concurrent_executions: "true" => "false"
max_thread_count: "0" => "1"
preserve_options_order: "true" => "false"
rank_order: "" => "ascending"
rundeck_job.example: Modifications complete
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
~ rundeck_job.example
allow_concurrent_executions: "true" => "false"
max_thread_count: "0" => "1"
preserve_options_order: "true" => "false"
rank_order: "" => "ascending"
Plan: 0 to add, 1 to change, 0 to destroy.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
terraform apply
Important Factoids
Rundeck Pro 1.3.9 (2.6.9-1)