-
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
compute_url_map - dynamic route_rule block(s) #9415
Comments
@drandell what error did you receive? Can you post the full debug log so I can take a close look? |
Sorry, i didnt get an error as such, but the plan just did not look correct. So if i try and include the 2nd dynamic block, this is the plan output; # module.load_balancer.module.load_balancer_https[0].google_compute_url_map.url_map will be updated in-place
~ resource "google_compute_url_map" "url_map" {
id = "projects/[REDACTED]/global/urlMaps/load-balancer"
name = "load-balancer"
# (6 unchanged attributes hidden)
~ path_matcher {
name = "live"
# (1 unchanged attribute hidden)
~ route_rules {
~ priority = 1 -> (known after apply)
~ service = "[REDACTED]" -> (known after apply)
+ header_action {
+ request_headers_to_remove = (known after apply)
+ response_headers_to_remove = (known after apply)
+ request_headers_to_add {
+ header_name = (known after apply)
+ header_value = (known after apply)
+ replace = (known after apply)
}
+ response_headers_to_add {
+ header_name = (known after apply)
+ header_value = (known after apply)
+ replace = (known after apply)
}
}
~ match_rules {
+ full_path_match = (known after apply)
~ ignore_case = false -> (known after apply)
~ prefix_match = "/ss" -> (known after apply)
+ regex_match = (known after apply)
+ header_matches {
+ exact_match = (known after apply)
+ header_name = (known after apply)
+ invert_match = (known after apply)
+ prefix_match = (known after apply)
+ present_match = (known after apply)
+ regex_match = (known after apply)
+ suffix_match = (known after apply)
+ range_match {
+ range_end = (known after apply)
+ range_start = (known after apply)
}
}
+ metadata_filters {
+ filter_match_criteria = (known after apply)
+ filter_labels {
+ name = (known after apply)
+ value = (known after apply)
}
}
+ query_parameter_matches {
+ exact_match = (known after apply)
+ name = (known after apply)
+ present_match = (known after apply)
+ regex_match = (known after apply)
}
}
+ route_action {
+ cors_policy {
+ allow_credentials = (known after apply)
+ allow_headers = (known after apply)
+ allow_methods = (known after apply)
+ allow_origin_regexes = (known after apply)
+ allow_origins = (known after apply)
+ disabled = (known after apply)
+ expose_headers = (known after apply)
+ max_age = (known after apply)
}
+ fault_injection_policy {
+ abort {
+ http_status = (known after apply)
+ percentage = (known after apply)
}
+ delay {
+ percentage = (known after apply)
+ fixed_delay {
+ nanos = (known after apply)
+ seconds = (known after apply)
}
}
}
+ request_mirror_policy {
+ backend_service = (known after apply)
}
+ retry_policy {
+ num_retries = (known after apply)
+ retry_conditions = (known after apply)
+ per_try_timeout {
+ nanos = (known after apply)
+ seconds = (known after apply)
}
}
+ timeout {
+ nanos = (known after apply)
+ seconds = (known after apply)
}
+ url_rewrite {
+ host_rewrite = (known after apply)
+ path_prefix_rewrite = (known after apply)
}
+ weighted_backend_services {
+ backend_service = (known after apply)
+ weight = (known after apply)
+ header_action {
+ request_headers_to_remove = (known after apply)
+ response_headers_to_remove = (known after apply)
+ request_headers_to_add {
+ header_name = (known after apply)
+ header_value = (known after apply)
+ replace = (known after apply)
}
+ response_headers_to_add {
+ header_name = (known after apply)
+ header_value = (known after apply)
+ replace = (known after apply)
}
}
}
}
+ url_redirect {
+ host_redirect = (known after apply)
+ https_redirect = (known after apply)
+ path_redirect = (known after apply)
+ prefix_redirect = (known after apply)
+ redirect_response_code = (known after apply)
+ strip_query = (known after apply)
}
}
- route_rules {
- priority = 2 -> null
- service = "[REDACTED]" -> null
- match_rules {
- ignore_case = false -> null
- prefix_match = "/ravegeo" -> null
}
}
- route_rules {
- priority = 3 -> null
- match_rules {
- ignore_case = false -> null
- prefix_match = "/geo-admin" -> null
}
- url_redirect {
- https_redirect = true -> null
- prefix_redirect = "/ravegeo/admin" -> null
- strip_query = false -> null
}
}
}
# (1 unchanged block hidden)
} note: i've redacted some of the service urls and project-id. This doesnt look right to me (so we never applied). Also the second example, with the dynamic handling 3 services and the 1 hardcoded route rule. That also produces the same plan output. |
@drandell Since we only have the partial code, it is hard to repro the issue. Can you create a complete test config that can be used to repro the issue? |
Will come back when i get time to make a repro repo |
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
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 tohashibot
, a community member has claimed the issue already.Terraform Version
v1.0.0
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
The 3 route_rules already exist, the fourth route_rule should be created with the dynamic block.
Actual Behavior
If we comment in the extra dynamic block, then in the resource only the /ss rule is shown as being created (the other 2 rules are marked as being deleted in a plan), the fourth rule (in the dynamic block) does not even appear in the plan.
If we comment in the hard-coded route_rule then it works as expected.
I also tried to merge all 3 services into one, since they are similar;
Steps to Reproduce
terraform apply
Important Factoids
n/a
The text was updated successfully, but these errors were encountered: