Harden low-risk infrastructure settings
This commit is contained in:
@@ -24,29 +24,19 @@ resource "aws_vpc_security_group_egress_rule" "web_all_ipv4" {
|
||||
region = var.region
|
||||
|
||||
security_group_id = aws_security_group.web.id
|
||||
description = "Allow all outbound traffic from the public web instance"
|
||||
ip_protocol = "-1"
|
||||
cidr_ipv4 = "0.0.0.0/0"
|
||||
}
|
||||
|
||||
# The default SG is adopted. Its two rules are managed as an absolute inline
|
||||
# set and must not be mixed with standalone rule resources.
|
||||
# The default SG is adopted. Its ingress and egress rules are managed as an
|
||||
# absolute empty set and must not be mixed with standalone rule resources.
|
||||
resource "aws_default_security_group" "this" {
|
||||
region = var.region
|
||||
vpc_id = local.vpc.id
|
||||
|
||||
ingress {
|
||||
description = null
|
||||
protocol = "tcp"
|
||||
from_port = 22
|
||||
to_port = 22
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
}
|
||||
|
||||
egress {
|
||||
description = null
|
||||
protocol = "-1"
|
||||
from_port = 0
|
||||
to_port = 0
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
}
|
||||
# ingress/egress use attributes-as-blocks semantics. Explicit empty lists are
|
||||
# required to revoke the rules already managed in state.
|
||||
ingress = []
|
||||
egress = []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user