MPI Parallel Cluster - opening all ports within the clusters of machines?

I am troubleshooting an OpenMPI cluster I spun up via Terraform.

What is the correct way to define the cidr_blocks so that all the machines within the clusters have restriction for a given port range?

MPI communication

ingress {
from_port = 1024
to_port = 65535
protocol = “tcp”
# Important to allow
# cidr_blocks = [cidrsubnet(data.aws_vpc.default.cidr_block, 4, 1)]
# cidr_blocks = [“0.0.0.0/0”] # bad security risks
}

Cheers

Answering my own question

cidr_blocks = [data.aws_vpc.default.cidr_block]

is sufficient for MPI to communicate successfully with all nodes within the cluster.