Open lizthegrey opened 4 years ago
Just ran into this. I suspect it's because that field should be using a default instead of being "computed"
"load_balancing_algorithm_type": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{
"round_robin",
"least_outstanding_requests",
}, false),
},
Hey @lizthegrey 👋 Thank you for taking the time to file this! Given that there's been a number of AWS Provider releases since you initially filed it, can you confirm whether you're still experiencing this behavior?
Just ran into this. I suspect it's because that field should be using a default instead of being "computed"
"load_balancing_algorithm_type": { Type: schema.TypeString, Optional: true, Computed: true, ValidateFunc: validation.StringInSlice([]string{ "round_robin", "least_outstanding_requests", }, false), },
As per this, I believe because there is still no Default: "round_robin",
at https://github.com/hashicorp/terraform-provider-aws/blob/187f1659a4fef11ac314567273b5470afe6b662f/internal/service/elbv2/target_group.go#L132 that the bug still exists and should be reproducible with the repro instructions I gave. However, it is not a priority for us to repro as we are not using least_outstanding_requests
and flipping it back and forth at the moment.
Community Note
Terraform Version
Terraform/0.12.23 TFC/402a0ad321
Provider Version
v2.52.0
Affected Resource(s)
Terraform Configuration Files
First, create:
Then roll back to (notice the removed
load_balancing_algorithm_type
field):Debug Output
n/a
Panic Output
n/a
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform apply
to create an ALB target group withload_balancing_algorithm_type
set to the non-default ofleast_outstanding_requests
terraform apply
to remove theload_balancing_algorithm_type
parameterImportant Factoids
n/a
References
11141 (introduced the new
load_balancing_algorithm_type
parameter but didn't correctly restore it to defaults if not present)11019
11039