Are you interested in using Terraform for micro-segmentation as code with VMware vDefend Distributed Firewall? This paper walks you through the basics of how to achieve just this!
https://www.vmware.com/docs/vmware-beginning-terraform-with-vdefend-firewall