Variable types in Terraform

any - Default value if no type is specified.
any - is not itself a type. It is a special construct that serves as a placeholder for a type yet to be decided.
Terraform will attempt to find a single actual type that could replace the any keyword to produce a valid result.
Example:

variable "no_type" {
  type = any
}
number:
variable "length" {
  default = 1
  type = number
  description = "Length of generated name"
}
bool:
variable "password_change" {
  default = "true"
  type = bool
  description = "Change the password"
}
string:
variable "sfilename" {
  default = "/tmp/file.txt"
  type = string
  description = "Path of the local file"
}
list
A sequence of values with the same primitive type identified by consecutive whole numbers starting with zero:
variable "prefix" {
  default = ["Mr", "Mrs", "Sir"]
  type = list(string)
  description = "List of prefixes for cats name"
}
map
A collection of values where each is identified by a string label:
variable "file_content" {
  default = {
    "dogs" = "We love dogs!"
    "cats" = "We love cats!"
  }
  type = map(string)
  description = "Cats or dogs"
}
set
A collection of unique values that do not have any secondary identifiers or ordering:
variable "valid_ages" {
  default = [15, 20, 25]
  type = set(number)
  description = "Valid ages for celebration"
}
object
A collection of named attributes that each have their own type:
variable "tom" {
  type = object({
    name = string
    color = string
    age = number
    food = list(string)
    favorite_pet = bool
  })
  default = {
    name = "Tom"
    color = "brown"
    age = 7
    food = ["fish", "chicken", "turkey"]
    favorite_pet = true
  })
  description = "Tom the cat"
}
tuple
A sequence of elements identified by consecutive whole numbers starting with zero, where each element has its own type:
variable "kitty" {
  type = tuple([string, number, bool])
  default = ["cat", 7, true]
  description = "Cats details"
}