-
Notifications
You must be signed in to change notification settings - Fork 21
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
Updated subnet tags and tightened up the security groups #22
Conversation
resource "aws_security_group" "ec2_instance" { | ||
name = "IN-SG" | ||
description = "Allow inbound and outbound traffic to EC2 instances from load balancer security group" | ||
ingress { | ||
from_port = 80 | ||
to_port = 80 | ||
protocol = "tcp" | ||
security_groups = [aws_security_group.lb.id] | ||
} | ||
egress { | ||
from_port = 0 | ||
to_port = 0 | ||
protocol = "-1" | ||
cidr_blocks = ["0.0.0.0/0"] | ||
} | ||
vpc_id = aws_vpc.this.id | ||
} |
Check failure
Code scanning / checkov
Ensure every security groups rule has a description Error
resource "aws_security_group" "lb" { | ||
name = "LB-SG" | ||
description = "Allow inbound and outbound traffic to load balancer from the internet." | ||
ingress { | ||
from_port = 80 | ||
to_port = 80 | ||
protocol = "tcp" | ||
cidr_blocks = ["0.0.0.0/0"] | ||
} | ||
egress { | ||
from_port = 0 | ||
to_port = 0 | ||
protocol = "-1" | ||
cidr_blocks = ["0.0.0.0/0"] | ||
} | ||
vpc_id = aws_vpc.this.id | ||
} |
Check failure
Code scanning / checkov
Ensure no security groups allow ingress from 0.0.0.0:0 to port 80 Error
resource "aws_security_group" "lb" { | ||
name = "LB-SG" | ||
description = "Allow inbound and outbound traffic to load balancer from the internet." | ||
ingress { | ||
from_port = 80 | ||
to_port = 80 | ||
protocol = "tcp" | ||
cidr_blocks = ["0.0.0.0/0"] | ||
} | ||
egress { | ||
from_port = 0 | ||
to_port = 0 | ||
protocol = "-1" | ||
cidr_blocks = ["0.0.0.0/0"] | ||
} | ||
vpc_id = aws_vpc.this.id | ||
} |
Check failure
Code scanning / checkov
Ensure every security groups rule has a description Error
💰 Infracost estimate: monthly cost will not change View in Infracost Cloud. This comment will be updated when the cost estimate changes. |
💰 Infracost estimate: monthly cost will not change View in Infracost Cloud. This comment will be updated when the cost estimate changes. |
Terraform Format and Style 🖌
|
The changes in this PR close #17 and close #3