@@ -767,7 +767,7 @@ resource "aws_vpc_security_group_egress_rule" "this" {
767
767
cidr_ipv4 = each. value . cidr_ipv4
768
768
cidr_ipv6 = each. value . cidr_ipv6
769
769
description = each. value . description
770
- from_port = coalesce (each. value . from_port , each. value . to_port )
770
+ from_port = try ( coalesce (each. value . from_port , each. value . to_port ), null )
771
771
ip_protocol = each. value . ip_protocol
772
772
prefix_list_id = each. value . prefix_list_id
773
773
referenced_security_group_id = each. value . referenced_security_group_id
@@ -780,7 +780,7 @@ resource "aws_vpc_security_group_egress_rule" "this" {
780
780
each. value . tags ,
781
781
)
782
782
783
- to_port = coalesce (each. value . to_port , each. value . from_port )
783
+ to_port = try ( coalesce (each. value . to_port , each. value . from_port ), null )
784
784
}
785
785
786
786
resource "aws_vpc_security_group_ingress_rule" "this" {
@@ -791,7 +791,7 @@ resource "aws_vpc_security_group_ingress_rule" "this" {
791
791
cidr_ipv4 = each. value . cidr_ipv4
792
792
cidr_ipv6 = each. value . cidr_ipv6
793
793
description = each. value . description
794
- from_port = coalesce (each. value . from_port , each. value . to_port )
794
+ from_port = try ( coalesce (each. value . from_port , each. value . to_port ), null )
795
795
ip_protocol = each. value . ip_protocol
796
796
prefix_list_id = each. value . prefix_list_id
797
797
referenced_security_group_id = each. value . referenced_security_group_id
@@ -804,7 +804,7 @@ resource "aws_vpc_security_group_ingress_rule" "this" {
804
804
each. value . tags ,
805
805
)
806
806
807
- to_port = coalesce (each. value . to_port , each. value . from_port )
807
+ to_port = try ( coalesce (each. value . to_port , each. value . from_port ), null )
808
808
}
809
809
810
810
# ###############################################################################
0 commit comments