How to simplify this terraform code v0.15?

After upgrading terraform from v0.11 to v0.15, code (OCI Security List ) was so long , I could simplify up to this level , is there another way that we can simplify this code further more ? Infrastructure: OCI - Oracle Cloud Infrastructure Terraform Version: 0.15

code sample - Repeating code section:

enter image description here

resource "oci_core_security_list" "seclist_app" {
    compartment_id = data.terraform_remote_state.vcn--01.outputs.compartment_id
    vcn_id         = data.terraform_remote_state.vcn--01.outputs.vcn_id
    display_name   = "SecList APP"
    
    egress_security_rules {
        destination = data.terraform_remote_state.vcn--01.outputs.connected_integration_servers
        protocol    = local.icmp_protocol
    }
    dynamic "egress_security_rules" {
        for_each = [ local.sqlnet_ports  ]
        content{
            destination = data.terraform_remote_state.vcn--01.outputs.connected_integration_servers
            protocol    = local.tcp_protocol
            tcp_options {
                max = lookup(egress_security_rules.value, "max", null)
                min = lookup(egress_security_rules.value, "min", null)  
            }
        }
    }

    egress_security_rules {
        destination = data.terraform_remote_state.vcn--01.outputs.connected_dbhost_01
        protocol    = local.icmp_protocol
    }
    dynamic "egress_security_rules" {
        for_each = [ local.sqlnet_ports  ]
        content{
            destination = data.terraform_remote_state.vcn--01.outputs.connected_dbhost_01
            protocol    = local.tcp_protocol
            tcp_options {
                max = lookup(egress_security_rules.value, "max", null)
                min = lookup(egress_security_rules.value, "min", null)  
            }
        }
    }
    
    egress_security_rules {
        destination = data.terraform_remote_state.vcn--01.outputs.connected_dbhost_02
        protocol    = local.icmp_protocol
    }
    dynamic "egress_security_rules" {
        for_each = [ local.sqlnet_ports  ]
        content{
            destination = data.terraform_remote_state.vcn--01.outputs.connected_dbhost_02
            protocol    = local.tcp_protocol
            tcp_options {
                max = lookup(egress_security_rules.value, "max", null)
                min = lookup(egress_security_rules.value, "min", null)  
            }
        }
    }
}

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum