variable "connections" { description = "postgres configuration map by environment" sensitive = true type = object({ default : object({ db : optional(string) host : optional(string) port : optional(number) username : optional(string, "postgres") password : string }) prod : object({ db : optional(string) host : optional(string) port : optional(number) username : optional(string, "postgres") password : string }) }) } variable "postgres" { description = "postgres configuration" type = object({ user = optional(string, "postgres") secret = string db = optional(string, "postgres") }) }