This is just an example of how to pull in buddy IP's, and then assign them to an aws_security_group using terraform.

The procedure is not specific to aws_security_group, and can be used for anything that needs CIDR blocks or multiple IPs

Read More