How do I specify map of list values ?

I am trying to change the list of subnets depending on the workspace that I use. What is the right way to do it ? I get the following error when i try the below way - Error: Invalid default value for variable

variable "public_subnet_map" { type = map(string) default = { "workspace1" = ["10.0.104.0/24", "10.0.105.0/24", "10.0.106.0/24"], "workspace2" = ["10.0.104.0/24", "10.0.105.0/24", "10.0.106.0/24"], "workspace3" = ["10.1.104.0/24", "10.1.105.0/24", "10.1.106.0/24"], } } 
submitted by /u/iyerramji80
[link] [comments]

Read more here: https://www.reddit.com/r/Terraform/comments/nx0oe6/how_do_i_specify_map_of_list_values/

Content Attribution

This content was originally published by /u/iyerramji80 at Terraform, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: