flatten - Functions - Configuration Language | Terraform | HashiCorp Developer

The flatten function eliminates nested lists from a list.