terraform-provider-google
terraform-provider-google copied to clipboard
google_compute_url_map: support testing headers, and URL redirects/rewrites
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 the 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 the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.
Description
The Google Cloud REST API for URL maps supports some parameters in the tests block that don't appear to be supported by the current version of the Terraform provider:
headersexpectedOutputUrlexpectedRedirectResponseCode
It would be great to have support for these so I can test some tricky routing on my load balancer.
New or Affected Resource(s)
- google_compute_url_map
Potential Terraform Configuration
resource "google_compute_url_map" "well-tested-urlmap" {
# ...
test {
description = "example test"
host = "example.com"
path = "/a/path"
header {
name = "X-Test-Header"
value = "foo"
}
header {
name = "X-Another-Test-Header"
value = "bar"
}
expected_output_url = "/i-rewrote/a/path"
expected_redirect_response_code = 302
}
}
b/359704736
Currently the test block of google_compute_url_map doesn't support these arguments:
headersexpectedOutputUrlexpectedRedirectResponseCode
Does https://github.com/hashicorp/terraform-provider-google/pull/23199 resolve this?
It looks like it.
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_url_map#nested_test