I have the following variable in my variables.tf file:
variable "accounts" {
type = map(object({
field1 = string,
field2 = list(string),
field3 = list(string),
field4 = list(string),
field5 = string
}))
}
I need to add a default field so that my users don't have to specify every field. For example, if field2 is an empty list, I don't want the user to have to define field2 =[]
I've tried some variations of the following but nothing seems to work.
default = {
default = {
"field1" = "",
"field2" = [],
"field3" = [],
"field4" = [],
"field5" = ""
}
}
Anyone have any idea of how to do it or know if it's even possible?