-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Ensure target group and load balancer names cannot exceed their max length #96
Conversation
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.
Bridgecrew has found 1 infrastructure configuration error in this PR ⬇️
id_length_limit = var.load_balancer_name_max_length | ||
context = module.this.context | ||
} | ||
|
||
resource "aws_lb" "default" { |
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.
Ensure that ALB redirects HTTP requests into HTTPS ones
Resource: aws_lb.default | ID: BC_AWS_NETWORKING_49
How to Fix
resource "aws_lb" "lb_good" {
}
resource "aws_lb_listener" "listener_good" {
load_balancer_arn = aws_lb.lb_good.arn
port = "80"
protocol = "HTTP"
default_action {
type = "redirect"
redirect {
port = "443"
protocol = "HTTPS"
status_code = "HTTP_301"
}
}
}
Description
TBADependent Resources
Path | Resource | Connecting Attribute |
---|---|---|
/main.tf | aws_lb_listener.http_forward | load_balancer_arn |
/main.tf | aws_lb_listener.http_redirect | load_balancer_arn |
/main.tf | aws_lb_listener.https | load_balancer_arn |
/test all |
This pull request is now in conflict. Could you fix it @nitrocode? 🙏 |
/test all |
what
*_max_length
variables in case AWS changes their max length in the futureload_balancer_name
, similar totarget_group_name
why
references