-
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
Support custom headers on backend bucket and backend service #7299
Support custom headers on backend bucket and backend service #7299
Comments
@ndmckinley this issue can be closed now :) |
Ah of course, thank you. :) |
@ndmckinley @cagataygurturk I'm trying it for HSTS header and it does not seem to work.
|
In fact I also tried a dummy example like:
and it seems to be the terraform right syntax but I've been unable to get any header working (also tried X-Frame-Options: DENY as seen in doc). Custom headers only seems to be working using UI or gcloud command an are visible after 5-6 minutes. Opened a case in GCP and they confirmed it. BTW, it does not work in GKE ingress controllers either. |
@lpzdvd-packlink You are right. Terraform succeeds but the setting is not persisted. @ndmckinley do you think it is a Terraform issue? |
I think that's unlikely - I am not sure how the tests passed if the values are not persisted, let me ask this week's onduty to look into that. @c2thorn, any guesses? |
Just to clarify, I've been looking for an answer last weeks because we're passing trough an audit process and it requires custom response headers. It started in GKE ingress controllers (implements HTTP(s) LB) and we realized there are no BackedConfig spec but you can manually patch ingress (using gcloud CLI or UI). It works but is erased after some minutes. Btw, this feature is not in the product roadmap. The we tried pure L7 LBs outside GKE scope. We patched using UI and gcloud and got header exactly 6 minutes after it has been applied but there was no terraform support and then I landed in this issue. Btw, it worked for dummy thing like Hope it helps. |
Looks like |
@c2thorn Correct, with the beta provider the property is properly applied and persisted. Thanks for fixing and apologies for the bug I have created! P.S.: Cloud Console does not specify this feature as beta, that's why its beta status did not catch my attention. |
It will be nice if examples are updated as it's not clear if custom headers is a block or list(string). |
@c2thorn it works as expected. |
@lpzdvd-packlink We can promote to GA after the API promotes the field to GA, and I am not sure when that would be. The google provider changelog will have an entry for when it is promoted to GA, and the field documentation will no longer have the |
@lpzdvd-packlink The example usage is here and it is as same as custom request headers: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_backend_service#example-usage---backend-service-network-endpoint |
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
It is now possible to set custom request and response headers on backend services and backend buckets.
New or Affected Resource(s)
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: