Skip to content

Commit 2761445

Browse files
feat: Allow internal tcp load balancers on all ports with var.all_ports (#30)
1 parent 4c0a9cf commit 2761445

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ resource "google_compute_forwarding_rule" "default" {
3939
ip_address = var.ip_address
4040
ip_protocol = var.ip_protocol
4141
ports = var.ports
42+
all_ports = var.all_ports
4243
service_label = var.service_label
4344
}
4445

outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@ output "ip_address" {
1818
description = "The internal IP assigned to the regional forwarding rule."
1919
value = google_compute_forwarding_rule.default.ip_address
2020
}
21+
22+
output "forwarding_rule" {
23+
description = "The forwarding rule self_link."
24+
value = google_compute_forwarding_rule.default.self_link
25+
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ variable "ports" {
6464
type = list(string)
6565
}
6666

67+
variable "all_ports" {
68+
description = "Boolean for all_ports setting on forwarding rule."
69+
type = bool
70+
default = null
71+
}
72+
6773
variable "health_check" {
6874
description = "Health check to determine whether instances are responsive and able to do work"
6975
type = object({

0 commit comments

Comments
 (0)