-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
2.20.0 breaks google_compute_region_backend_service with "backend.0.group": required field is not set #4951
Comments
Hey @korjik, Are you sure that the variable that is defined for In the past you could theoretically provide an empty block for the resource "google_compute_region_backend_service" "default" {
name = "region-backend-service"
region = "us-central1"
health_checks = ["${google_compute_health_check.default.self_link}"]
connection_draining_timeout_sec = 10
session_affinity = "CLIENT_IP"
backend = ["${var.backends}"]
}
variable "backends" {
type = "list"
default = [
{
group = "backend1-test"
},
{
group = "backend2-test"
},
]
} This plans successfully, but if I remove one of the group definitions to make the backends var look like this: variable "backends" {
type = "list"
default = [
{
},
{
group = "backend2-test"
},
]
} then it fails with the error message you have posted. Can you verify that the output "backends" {
value = "${var.backends}"
} The apply needs to succeed, so you may need to comment out resources that are failing |
FWIW, I get the same error with the same TF & provider configurations. I'm passing in: |
@neilepalmer are you able to output the Are you able to provide full debug logs for this issue? It would help track down the problem as I am unable to reproduce currently |
Hi I'm getting the same error.
Configuration:
Terraform version
|
On a sidenote, I fixed my issue because I was referencing the self link of the IG instead of the instance group parameter.
Will it be possible to use the self link to reference the IG instead of the instance group parameter? Thanks |
@upodroid I don't understand, You want to reference the instance group that is created by the instance group manager via |
I assumed the IG and IGM are the same thing. If they aren't, then please ignore my request. |
I am getting the same error This is on an environment already created with 2.19.0 and trying to run terraform plan with 2.20.0. The terraform.tfstate file shows the backend list is populated with full links. (names updated to be generic)
Is this an issue with using the group self link instead of the short name? |
With 2.20.0 the debug ends with
With 2.19.0 the same section looks like
|
This is happening to us as well. We're trying to upgrade from |
@billyfoss and/or @stevenaldinger can you provide configs that are causing the failure? Sorry for taking so long to get back on this, there seem to be several different reports of issues around backend.group in here |
@slevenick I recreated the issue this evening. I'll have to see if I can find a smaller segment that recreates the issue. I remember doing quite a bit to get the logs I copied above. |
@emilymye could this be related to the other regionbackendservice stuff? |
I ran into #5218 which required me to update to 2.20, but this issue was breaking the move to 2.20. Thanks to @danawillow for helping me workaround by using the google-beta provider at 2.20 on only the resources that needed the newer version while remaining on 2.19 for the remaining resources until this is fixed. Details of the workaround are described at: #5218 (comment) |
Hey @billyfoss if you move to terraform 0.12 do you still notice the same error? I'm wondering if this is a similar issue to #3937 which may show up differently because they are using 0.12 |
Hello, for my part I couldn't test with 0.12, but this is what I have seen:
backend = ["${var.backends}"]
backend {
group = "${element(data.google_compute_instance_group.instance_groups.*.self_link, count.index)}"
description = "${trimspace(lookup(var.backends[count.index], "description", ""))}"
balancing_mode = "${trimspace(lookup(var.backends[count.index], "balancing_mode", "UTILIZATION"))}"
max_utilization = "${trimspace(lookup(var.backends[count.index], "max_utilization", 0.8))}"
max_rate = "${trimspace(lookup(var.backends[count.index], "max_rate", 0))}"
max_rate_per_instance = "${trimspace(lookup(var.backends[count.index], "max_rate_per_instance", 0))}"
max_connections = "${trimspace(lookup(var.backends[count.index], "max_connections", 0))}"
max_connections_per_instance = "${trimspace(lookup(var.backends[count.index], "max_connections_per_instance", 0))}"
capacity_scaler = "${trimspace(lookup(var.backends[count.index], "capacity_scaler", 1))}"
}
backend = [
{
group = "${element(data.google_compute_instance_group.instance_groups.*.self_link, count.index)}"
description = "${trimspace(lookup(var.backends[count.index], "description", ""))}"
balancing_mode = "${trimspace(lookup(var.backends[count.index], "balancing_mode", "UTILIZATION"))}"
max_utilization = "${trimspace(lookup(var.backends[count.index], "max_utilization", 0.8))}"
max_rate = "${trimspace(lookup(var.backends[count.index], "max_rate", 0))}"
max_rate_per_instance = "${trimspace(lookup(var.backends[count.index], "max_rate_per_instance", 0))}"
max_connections = "${trimspace(lookup(var.backends[count.index], "max_connections", 0))}"
max_connections_per_instance = "${trimspace(lookup(var.backends[count.index], "max_connections_per_instance", 0))}"
capacity_scaler = "${trimspace(lookup(var.backends[count.index], "capacity_scaler", 1))}"
},
]
backend = ["${data.null_data_source.backends.*.outputs}"] (in my example, the content of In my case this problem is blocking, as I need the "INTERNAL_MANAGED" feature of the resource which has been added from v2.20 in beta and is not available in v2.19 (which has no backends broken). |
Co-authored-by: upodroid <[email protected]> Co-authored-by: Cameron Thornton <[email protected]> Signed-off-by: Modular Magician <[email protected]>
Co-authored-by: upodroid <[email protected]> Co-authored-by: Cameron Thornton <[email protected]> Signed-off-by: Modular Magician <[email protected]> Co-authored-by: upodroid <[email protected]> Co-authored-by: Cameron Thornton <[email protected]>
@rileykarson The breaking change was introduced 4 major releases ago, can we close this bug as probably nobody is using 2.20 version anymore as well as the group parameter is indeed required by the Google Backend Service? |
That seems reasonable |
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. |
Community Note
Terraform Version
Terraform v0.11.14
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/korjik/70eb44a79671cb4d686ae3c0a0ede1c2
Expected Behavior
terraform plan works fine
Actual Behavior
Terrafrom plan breaks with:
google_compute_region_backend_service.internal: "backend.0.group": required field is not set
Steps to Reproduce
b/309764960
The text was updated successfully, but these errors were encountered: