Complete the code to declare a variable that only accepts strings.
variable "example_var" { type = [1] }
The string type constraint ensures the variable only accepts string values.
Complete the code to declare a variable that only accepts a list of strings.
variable "example_list" { type = [1] }
The list(string) type constraint ensures the variable accepts a list where each item is a string.
Fix the error in the variable type declaration to accept a map with string keys and number values.
variable "example_map" { type = [1] }
The map(number) type constraint allows a map with string keys and number values.
Fill both blanks to declare a variable that accepts an object with a string 'name' and a number 'age'.
variable "person" { type = object({ name = [1], age = [2] }) }
The object type requires specifying each attribute's type. Here, 'name' is a string and 'age' is a number.
Fill all three blanks to declare a variable that accepts a tuple with a string, a number, and a bool.
variable "tuple_var" { type = tuple([[1], [2], [3]]) }
The tuple type defines an ordered list of fixed types: string, number, and bool in this order.