You can specify the type of a variable to enforce that the provided value matches the expected type.
variable "vpc_cidr_block" {
description = "CIDR block for the VPC"
type = string
}
variable "availability_zones" {
description = "List of availability zones"
type = list(string)
}
variable "instance_tags" {
description = "Map of tags to assign to the instance"
type = map(string)
}