Remove unrestricted web egress rule
This commit is contained in:
@@ -170,11 +170,6 @@ import {
|
|||||||
id = each.value
|
id = each.value
|
||||||
}
|
}
|
||||||
|
|
||||||
import {
|
|
||||||
to = module.network_public.aws_vpc_security_group_egress_rule.web_all_ipv4
|
|
||||||
id = "sgr-0f27372c08f83f904"
|
|
||||||
}
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
to = module.network_public.aws_instance.web_protected[0]
|
to = module.network_public.aws_instance.web_protected[0]
|
||||||
id = "i-0a2d6193bfd326038"
|
id = "i-0a2d6193bfd326038"
|
||||||
|
|||||||
@@ -33,17 +33,6 @@ resource "aws_vpc_security_group_egress_rule" "web" {
|
|||||||
cidr_ipv4 = each.value.cidr_ipv4
|
cidr_ipv4 = each.value.cidr_ipv4
|
||||||
}
|
}
|
||||||
|
|
||||||
# Keep the imported all-egress rule during stage 1. Stage 2 removes this
|
|
||||||
# resource only after host inventory and the REJECT-monitoring query are ready.
|
|
||||||
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 ingress and egress rules are managed as an
|
# 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.
|
# absolute empty set and must not be mixed with standalone rule resources.
|
||||||
resource "aws_default_security_group" "this" {
|
resource "aws_default_security_group" "this" {
|
||||||
|
|||||||
Reference in New Issue
Block a user