-
Notifications
You must be signed in to change notification settings - Fork 392
fix!: Adding regex validation for service name and adding apphub #522
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
Conversation
q2w
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
- please validate the service_uri format being introduced here.
- please validate if changing the neg name would not trigger delete/create.
modules/frontend/outputs.tf
Outdated
| } | ||
|
|
||
| output "apphub_service_uri" { | ||
| value = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep this list of object like it is in regional LB?
modules/frontend/outputs.tf
Outdated
| output "apphub_service_uri" { | ||
| value = { | ||
| service_uri = "//compute.googleapis.com/${google_compute_forwarding_rule.default[0].id}" | ||
| service_id = substr("${google_compute_forwarding_rule.default[0].name}-${md5("global-${var.project_id}")}", 0, 63) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| service_id = substr("${google_compute_forwarding_rule.default[0].name}-${md5("global-${var.project_id}")}", 0, 63) | |
| service_id = substr("${google_compute_forwarding_rule.default[0].name}-${md5("global-lb-${var.project_id}")}", 0, 63) |
modules/backend/outputs.tf
Outdated
| } | ||
|
|
||
| output "apphub_service_uri" { | ||
| value = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep this as list of object. I see you already have the type in metadata.yaml as list of object.
modules/backend/outputs.tf
Outdated
| output "apphub_service_uri" { | ||
| value = { | ||
| service_uri = "//compute.googleapis.com/${google_compute_backend_service.default[0].id}" | ||
| service_id = substr("${google_compute_backend_service.default[0].name}-${md5("global-${var.project_id}")}", 0, 63) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| service_id = substr("${google_compute_backend_service.default[0].name}-${md5("global-${var.project_id}")}", 0, 63) | |
| service_id = substr("${google_compute_backend_service.default[0].name}-${md5("global-be-service-${var.project_id}")}", 0, 63) |
modules/backend/main.tf
Outdated
| for_each = toset(var.serverless_neg_backends) | ||
| content { | ||
| group = google_compute_region_network_endpoint_group.serverless_negs["neg-${var.name}-${backend.value.service_name}-${backend.value.region}"].id | ||
| group = google_compute_region_network_endpoint_group.serverless_negs["neg-${var.name}-${substr(sha256(backend.value.service_name), 0, 4)}-${backend.value.region}"].id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| group = google_compute_region_network_endpoint_group.serverless_negs["neg-${var.name}-${substr(sha256(backend.value.service_name), 0, 4)}-${backend.value.region}"].id | |
| group = google_compute_region_network_endpoint_group.serverless_negs["neg-${var.name}-${backend.value.region}-${substr(md5(backend.value.service_name), 0, 4)}"].id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You would need to change NEG resource name similarly.
|
Marking this a breaking change as it updates serverless_negs name within modules/backend. this would trigger delete/create behavior. |
Head branch was pushed to by a user without write access
No description provided.