-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
google_compute_region_backend_service is missing port_name field #5551
google_compute_region_backend_service is missing port_name field #5551
Comments
For context, many fields were omitted from the region backend service resource because they couldn't actually be set on it, and we prefer to keep the resource only with fields that a user can actually set (even if they're present in the API). However, things change over time and it's possible that something that didn't used to work for a resource now does. For this specific one, the docs say:
My recollection is that region backend services used to only support a loadBalancingScheme of INTERNAL, which would be why that field wouldn't work. Now that it can be INTERNAL_SELF_MANAGED, it's probably worth adding. The reason you weren't able to find the source in magic modules is that it's fully generated (the ones in third_party are mostly handwritten, and so we just copy them directly from there to here). Take a look at the README at https://github.com/GoogleCloudPlatform/magic-modules and the codelab at https://codelabs.developers.google.com/codelabs/magic-modules/index.html for some information on how MM works. These changes will be smaller than the one in the codelab since it's just adding a field on an existing resource rather than adding a whole new resource. If you're still interested in adding the missing fields, let me know and I'll assign this issue to you! |
Hi guys, There you'll find a solution (a hack, actually) I've found. |
Hello, Any news on this particular issue? I see that @igorwwwwwwwwwwwwwwwwwwww made a commit? @danawillow Thanks! |
@quentinleclerc Unfortunately I was not able to submit the patch due to the CLA requirement on the magic-modules repo. Somebody else is going to have to do that. |
Looks like there's already an open pr: GoogleCloudPlatform/magic-modules#3265 |
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! |
Community Note
Description
TLDR: The
google_compute_region_backend_service
resource is missing theport_name
field, which appears to be defaulting to"http"
at the moment.This breaks configurations where
protocol
is"HTTPS"
load_balancing_scheme
is"INTERNAL_MANAGED"
, and a named port other than"http"
is targeted.For the time being we have set this manually via
gcloud
(withlifecycle.ignore_changes = all
to prevent terraform from resetting it):I've taken a stab at a patch, but got stuck. The header in
resource_compute_region_backend_service.go
claims the file is auto-generated, but I was not able to find any source in magic modules. I'd be happy to open a PR from my branch and discuss further in the PR (let me know).It's worth noting that there appear to be several other fields that are present in
google_compute_backend_service
but missing fromgoogle_compute_region_backend_service
.New or Affected Resource(s)
google_compute_region_backend_service
Potential Terraform Configuration
References
cc @craigfurman
The text was updated successfully, but these errors were encountered: