How do I specify a list of values in a map?

in main.tf →

 private_subnets = lookup(var.private_subnet_map, terraform.workspace)

in variables.tf →

variable "private_subnet_map" {
  type = map(list)

  default = {
    "workspace1" = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"],
    "workspace2" = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"],
    "workspace3" = ["10.1.4.0/24", "10.1.5.0/24", "10.1.6.0/24"],
  }
}

The above syntax doesn’t work. What is the right way to make it work ?

Hi @iyerramji,

What you’ve shown here seems plausible to me, so I think in order to help I’ll need to you to say a little more about what didn’t work. Did Terraform report an error message? If so, please include the entire error message, along with any additional configuration snippets relevant to what the error message is reporting.

Thanks!