Skip to content
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

Make google_compute_backend_service.backends.group Required #4396

Closed
samcgardner opened this issue Sep 4, 2019 · 4 comments
Closed

Make google_compute_backend_service.backends.group Required #4396

samcgardner opened this issue Sep 4, 2019 · 4 comments

Comments

@samcgardner
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • If an issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to "hashibot", a community member has claimed the issue already.

Terraform Version

Terraform v0.12.6
+ provider.google v2.11.0
+ provider.google-beta v2.11.0
+ provider.local v1.3.0
+ provider.null v2.1.2
+ provider.random v2.1.2

Your version of Terraform is out of date! The latest version
is 0.12.7. You can update by downloading from www.terraform.io/downloads.html

Affected Resource(s)

google_compute_backend_service

Terraform Configuration Files

resource "google_compute_backend_service" "react-backend" {
  provider = "google-beta"

  name        = "react-be"
  port_name   = "http"
  protocol    = "HTTP"
  timeout_sec = 10

  health_checks = ["${google_compute_http_health_check.react-hc.self_link}"]
  backend {
    balancing_mode = "RATE"
    max_rate = 999999999
  }
}

resource "google_compute_http_health_check" "react-hc" {
  provider = "google-beta"

  name               = "react-hc"
  request_path       = "/Testpage"
  port               = 8080
  check_interval_sec = 5
  timeout_sec        = 5
}

(this is an excerpt from a larger module)

Debug Output

https://gist.github.com/samcgardner/15e6b220d22f3977d3ca003a2fdeb4b4

Expected Behavior

GCP's API should respond with a 4xx code for a bad request or handle resource creation successfully

Actual Behavior

GCP's API responds with a 503 Service Unavailable

Steps to Reproduce

  1. terraform apply
@ghost ghost added the bug label Sep 4, 2019
@rileykarson rileykarson self-assigned this Sep 4, 2019
@rileykarson
Copy link
Collaborator

rileykarson commented Sep 5, 2019

Weird! Mine returns a 4XX error:

Error creating BackendService: googleapi: Error 400: Invalid value for field 'resource.backends[0]': '{  "balancingMode": "RATE",  "maxUtilization": 0.8,  "maxRate": 999999999,  "capacityScaler": 1.0}'. Resource group must be set for a backend., invalid

As stated in that message, group is required.

We have the field set as optional in Terraform for historical reasons (#576) and I'd imagine I can change it back to Required. I'll try to repro the underlying error, hashicorp/terraform#16306, first though.

@rileykarson rileykarson changed the title 503 From GCP API When Creating or Updating Backend Service Using 'Rate' Balancing Mode Make google_compute_backend_service.backends.group Required Sep 5, 2019
@rileykarson
Copy link
Collaborator

rileykarson commented Sep 5, 2019

I can't repro the original issue that made this optional. Regardless, in order to not break older TF versions I'm going to mark this as a breaking change to roll into 3.0.0. It would probably be fine to make before, but I'd rather play it safe.

@rileykarson rileykarson removed their assignment Sep 5, 2019
@danawillow danawillow added this to the 3.0.0 milestone Sep 12, 2019
@nat-henderson
Copy link
Contributor

@ghost
Copy link

ghost commented Oct 26, 2019

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Oct 26, 2019
@github-actions github-actions bot added forward/review In review; remove label to forward service/compute-l7-load-balancer labels Jan 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants