optional() feature in variables is GA:
variable "with_optional_attribute" {
type = object({
a = string # a required attribute
b = optional(string) # an optional attribute
c = optional(number, 127) # an optional attribute with a default value
})
}
More here - https://github.com/hashicorp/terraform/releases/tag/v1.3.0
#terraform