-
Notifications
You must be signed in to change notification settings - Fork 7
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
Modules for ALB, NLB & corresponding listeners #13
Conversation
…akes it easier to manage the target groups and the listeners.
Further split into `alb` and `alb_listener` module.
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.
Look ok, for me this is a major version bump
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.
It looks good also to me. I agree with Mattias on the major version bump
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.
is there any value in the nlb and alb parts? I can understand for the listener but the main aws_lb modules don't do much
nlb/main.tf
Outdated
# Create a new load balancer | ||
resource "aws_lb" "nlb" { | ||
load_balancer_type = "network" | ||
name = "${var.project}-${var.environment}-${var.name}-nlb" |
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.
please use name_prefix
alb/main.tf
Outdated
@@ -1,5 +1,6 @@ | |||
# Create a new load balancer | |||
resource "aws_alb" "alb" { | |||
resource "aws_lb" "alb" { | |||
load_balancer_type = "application" | |||
name = "${var.project}-${var.environment}-${var.name}-alb" |
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.
please use name_prefix
nlb/sg.tf
Outdated
@@ -0,0 +1,11 @@ | |||
resource "aws_security_group" "sg_nlb" { | |||
name = "sg_alb_${var.project}_${var.environment}_${var.name}" |
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.
please use name_prefix
@SamClinckspoor the reason is cost. Contrary to an ELB, we will no longer set up a application or network load balancer per application. The LB will be a shared resource. For an application load balancer, we add HTTP and/or HTTPS listeners, then add For a network load balancer, we add additional port specific listeners. |
I mean, what value does the module bring. As far as I can tell the |
It's debatable indeed, but having the modules (lb + sg) makes the setup consistent module wise. |
Fix for: https://github.com/skyscrapers/core/issues/12
alb_listener
betweenalb
andalb_rule_target
. Makes it easier to manage target groups, listeners and listener rules.nlb
andnlb_listener
.