Skip to content

Commit

Permalink
#88 updated security group
Browse files Browse the repository at this point in the history
  • Loading branch information
kunduso committed Oct 3, 2024
1 parent 1e6ef02 commit 91f1330
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions infra/security_group.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ resource "aws_security_group_rule" "ingress_load_balancer" {
#checkov:skip=CKV_AWS_260: "Ensure no security groups allow ingress from 0.0.0.0:0 to port 80"
#This is non prod and hence enabled.
}
#https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule
resource "aws_security_group_rule" "egress_load_balancer" {
description = "allow traffic to reach outside the vpc"
type = "egress"
from_port = 0
to_port = 65535
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
security_group_id = aws_security_group.custom_sg.id
}
# #https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule
# resource "aws_security_group_rule" "egress_load_balancer" {
# description = "allow traffic to reach outside the vpc"
# type = "egress"
# from_port = 0
# to_port = 65535
# protocol = "tcp"
# cidr_blocks = ["0.0.0.0/0"]
# security_group_id = aws_security_group.custom_sg.id
# }
#https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group
resource "aws_security_group" "container_sg" {
name = "${var.name}_container_allow_inbound_access"
Expand Down Expand Up @@ -61,7 +61,7 @@ resource "aws_security_group_rule" "egress_container" {
from_port = 0
to_port = 65535
protocol = "tcp"
cidr_blocks = [aws_vpc.this.cidr_block]
cidr_blocks = ["0.0.0.0/0"]
security_group_id = aws_security_group.container_sg.id
}
#https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group
Expand Down

0 comments on commit 91f1330

Please sign in to comment.