@@ -767,7 +767,7 @@ resource "aws_vpc_security_group_egress_rule" "this" {
767767 cidr_ipv4 = each. value . cidr_ipv4
768768 cidr_ipv6 = each. value . cidr_ipv6
769769 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 )
771771 ip_protocol = each. value . ip_protocol
772772 prefix_list_id = each. value . prefix_list_id
773773 referenced_security_group_id = each. value . referenced_security_group_id
@@ -780,7 +780,7 @@ resource "aws_vpc_security_group_egress_rule" "this" {
780780 each. value . tags ,
781781 )
782782
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 )
784784}
785785
786786resource "aws_vpc_security_group_ingress_rule" "this" {
@@ -791,7 +791,7 @@ resource "aws_vpc_security_group_ingress_rule" "this" {
791791 cidr_ipv4 = each. value . cidr_ipv4
792792 cidr_ipv6 = each. value . cidr_ipv6
793793 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 )
795795 ip_protocol = each. value . ip_protocol
796796 prefix_list_id = each. value . prefix_list_id
797797 referenced_security_group_id = each. value . referenced_security_group_id
@@ -804,7 +804,7 @@ resource "aws_vpc_security_group_ingress_rule" "this" {
804804 each. value . tags ,
805805 )
806806
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 )
808808}
809809
810810# ###############################################################################
0 commit comments