-
Notifications
You must be signed in to change notification settings - Fork 62
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 support for associating an ECS service with a NLB. #15
Conversation
main.tf
Outdated
"protocol": "tcp" | ||
"containerPort": 80, | ||
"hostPort": 80, | ||
"protocol": "tcp" |
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.
What's up with this weird whitespace adjustment?
main.tf
Outdated
"awslogs-stream-prefix": "nginx" | ||
"awslogs-group": "${local.awslogs_group}", | ||
"awslogs-region": "${data.aws_region.current.name}", | ||
"awslogs-stream-prefix": "nginx" |
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.
What's up with this weird whitespace adjustment?
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.
Some how tabs snuck in there
@@ -308,7 +346,7 @@ locals { | |||
} | |||
|
|||
resource "aws_ecs_service" "main" { | |||
count = "${var.associate_lb}" | |||
count = "${var.associate_alb || var.associate_nlb ? 1 : 0}" |
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.
Does this really need the ? 1: 0
? These are both bools. I think it makes it extra clear this is different from the one below.
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.
I get cannot parse "true" as an integer
if I'm not being explicit
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.
🌞
This PR will allows the ECS service to register with a Network Load Balancer's target group. I also modified the
associate_lb
variable to be split intoassociate_alb
andassociate_nlb
. NLBs don't have security groups so this PR will allow the ingress from the NLB's subnets to the ECS containers.I'll release
v1.9.0
once this PR merges.