-
Notifications
You must be signed in to change notification settings - Fork 384
feat: added support for creating proxy only subnet #501
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
base: main
Are you sure you want to change the base?
feat: added support for creating proxy only subnet #501
Conversation
d4fba67
to
e97f914
Compare
modules/frontend/variables.tf
Outdated
region = string | ||
address = optional(string) | ||
subnetwork = optional(string) | ||
create_proxy_only_subnet = bool |
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 have a default value for this as false
?
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.
Done
@@ -200,11 +200,13 @@ variable "http_keep_alive_timeout_sec" { | |||
} | |||
|
|||
variable "internal_forwarding_rules_config" { | |||
description = "List of internal managed forwarding rules config. One of 'address' or 'subnetwork' is required for each. It is only applicable for internal load balancer" | |||
description = "List of internal managed forwarding rules config. One of 'address' or 'subnetwork' is required for each. If 'create_proxy_only_subnet' is true, 'proxy_only_subnet_ip' is required. It is only applicable for internal load balancer." |
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.
As mentioned here one of address
and subnetwork
can be configured. Can we have a validation block for this input variable to validate exactly this?
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.
Done
/gcbrun |
modules/frontend/main.tf
Outdated
@@ -43,6 +43,22 @@ locals { | |||
first_backend_service = try(local.backend_services_by_host[local.first_host][local.first_path], null) | |||
} | |||
|
|||
resource "google_compute_subnetwork" "proxy_only" { | |||
for_each = { | |||
for index, config in var.internal_forwarding_rules_config : index => config |
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.
Could you use region as key to remove risk of recreation because of order change? This is similar to how it has been done when creating forwarding rules for internal_forwarding_rules_config.
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.
Done
…nal_forwarding_rules_config variable
8b7114b
to
7355458
Compare
Uh oh!
There was an error while loading. Please reload this page.