Skip to content
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

add more security groups cause of limits #9262

Merged
merged 2 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ locals {
force_destroy_bucket = true
internal_lb = false
load_balancer_type = "application"
security_groups = ["public-lb"]
security_groups = ["public-lb", "public-lb-2"]
subnets = module.environment.subnets["public"].ids

listeners = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ locals {
enduserclient_internal = flatten([
"10.0.0.0/8",
])
enduserclient_public = flatten([
module.ip_addresses.moj_cidrs.trusted_moj_digital_staff_public,
enduserclient_public1 = flatten([
module.ip_addresses.moj_cidrs.trusted_moj_digital_staff_public
])
enduserclient_public2 = flatten([
module.ip_addresses.azure_fixngo_cidrs.internet_egress,
module.ip_addresses.mp_cidrs.live_eu_west_nat,
])
Expand All @@ -28,8 +30,10 @@ locals {
enduserclient_internal = [
"10.0.0.0/8"
]
enduserclient_public = flatten([
module.ip_addresses.moj_cidrs.trusted_moj_digital_staff_public,
enduserclient_public1 = flatten([
module.ip_addresses.moj_cidrs.trusted_moj_digital_staff_public
])
enduserclient_public2 = flatten([
module.ip_addresses.azure_fixngo_cidrs.internet_egress,
module.ip_addresses.mp_cidrs.live_eu_west_nat,
])
Expand Down Expand Up @@ -63,19 +67,19 @@ locals {
protocol = -1
self = true
}
http_lb = {
http = {
description = "Allow http ingress"
from_port = 80
to_port = 80
protocol = "TCP"
cidr_blocks = local.security_group_cidrs.enduserclient_public
cidr_blocks = local.security_group_cidrs.enduserclient_public1
}
https_lb = {
description = "Allow enduserclient https ingress"
https = {
description = "Allow https ingress"
from_port = 443
to_port = 443
protocol = "TCP"
cidr_blocks = local.security_group_cidrs.enduserclient_public
cidr_blocks = local.security_group_cidrs.enduserclient_public1
}
}
egress = {
Expand All @@ -88,6 +92,42 @@ locals {
}
}
}
public-lb-2 = {
description = "Security group for public load balancer part 2"
ingress = {
all-within-subnet = {
description = "Allow all ingress to self"
from_port = 0
to_port = 0
protocol = -1
self = true
}
http = {
description = "Allow http ingress"
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = local.security_group_cidrs.enduserclient_public2
}
https = {
description = "Allow https ingress"
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = local.security_group_cidrs.enduserclient_public2
}
}
egress = {
all = {
description = "Allow all egress"
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
security_groups = []
}
}
}
lb = {
description = "Security group for public subnet"
ingress = {
Expand Down
Loading