How to define an input variable which is an object with attributes "model" (string), "color" (string), year (number)?
Answer
variable "car_model" {
description = "Car model object"
type = object({
model = string
color = string
year = number
})
}
Note: you can also define a default for it.