Error: Invalid type specification for Optional attribute

I have resource block to create Cloudfront origin request policy.
I have used a variable

variable "origin_cookies" {
  description = "Determines whether any cookies in viewer requests are included in the origin request key and automatically included in requests that CloudFront sends to the origin. Valid values are none, whitelist, all, allExcept."
  type = object({
    behavior = optional(string, "none")
    items    = optional(set(string), [])
  })
  default  = {}
}

and getting the below error from a few days back.

Error: Invalid type specification
on .terraform/modules/CfOriginReqPolicy/AWS/CloudfrontOriginReqPolicy/variables.tf line 30, in variable "origin_cookies":
30:     items    = optional(set(string), [])

Optional attribute modifier expects only one argument: the attribute type.

Hi @TanujKumawatS,

The syntax you’ve shown here seems valid for current versions of Terraform.

Are you perhaps using an older version of Terraform which didn’t yet have support for including default values for optional attributes? This feature was introduced in Terraform v1.3.0.