Add restricted web egress rules
This commit is contained in:
@@ -14,6 +14,16 @@ output "vyos_source_security_group_ids" {
|
||||
value = module.network_public.vyos_source_security_group_ids
|
||||
}
|
||||
|
||||
output "web_egress_policy_matches" {
|
||||
value = length(module.network_public.web_egress_rule_specs) == 18 && alltrue([
|
||||
for cidr in ["192.0.2.0/24", "198.51.100.0/24"] :
|
||||
toset([for rule in values(module.network_public.web_egress_rule_specs) : rule.from_port if rule.cidr_ipv4 == cidr && rule.ip_protocol == "tcp"]) == toset([3000, 3001, 8200, 8300, 8301, 9000, 25090]) &&
|
||||
toset([for rule in values(module.network_public.web_egress_rule_specs) : rule.from_port if rule.cidr_ipv4 == cidr && rule.ip_protocol == "udp"]) == toset([123])
|
||||
]) && toset([for rule in values(module.network_public.web_egress_rule_specs) : rule.from_port if rule.cidr_ipv4 == "0.0.0.0/0" && rule.ip_protocol == "tcp"]) == toset([80, 443]) && alltrue([
|
||||
for rule in values(module.network_public.web_egress_rule_specs) : rule.description != "" && rule.from_port == rule.to_port
|
||||
])
|
||||
}
|
||||
|
||||
output "named_resources" {
|
||||
value = merge(
|
||||
module.network_public.named_resource_names,
|
||||
|
||||
Reference in New Issue
Block a user