Skip to content

Commit f78a398

Browse files
committed
Expose ingress CIDRs
1 parent ee54e6a commit f78a398

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ This software is released under the MIT License (see `LICENSE`).
9696
| lb\_healthcheck\_timeout | Timeout in seconds for LB to use when connecting health checks (default 5) | string | `5` | no |
9797
| lb\_healthcheck\_unhealthy\_threshold | Number of consecutive failed health checks before marking service as unhealthy (default 2) | string | `5` | no |
9898
| lb\_https\_ports | HTTPS ports load balancer should listen on | string | `443` | no |
99+
| lb\_ingress\_cidr\_blocks | List of ingress CIDR blocks for load balancer | list | `<list>` | no |
99100
| lb\_internal | Configure LB as internal-only | string | `true` | no |
100101
| lb\_ports | Ports load balancer should listen on | string | `80` | no |
101102
| lb\_stickiness\_enabled | Enable LB session stickiness (default false) | string | `false` | no |

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ module "sg-lb" {
9292
vpc_id = "${var.vpc_id}"
9393
egress_cidr_blocks = ["0.0.0.0/0"]
9494
egress_rules = ["all-all"]
95-
ingress_cidr_blocks = ["10.0.0.0/8"] # "${var.allowed_cidr_blocks}"
95+
ingress_cidr_blocks = ["${lb_ingress_cidr_blocks}"] # "${var.allowed_cidr_blocks}"
9696
ingress_rules = "${compact(split(",", local.sg_rules))}"
9797
}
9898

resource-plan-graph.png

-170 KB
Loading

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ variable "lb_https_ports" {
130130
default = "443"
131131
}
132132

133+
variable "lb_ingress_cidr_blocks" {
134+
description = "List of ingress CIDR blocks for load balancer"
135+
type = "list"
136+
default = ["10.0.0.0/8"]
137+
}
138+
133139
variable "lb_ports" {
134140
description = "Ports load balancer should listen on"
135141
default = "80"

0 commit comments

Comments
 (0)