Complete the code to declare a variable named 'region' with a default value.
variable "region" { type = string default = "[1]" }
The variable 'region' is declared as a string with a default value 'us-west-2'.
Complete the code to pass the variable 'region' to the module input.
module "network" { source = "./modules/network" region = [1] }
To pass a variable to a module input, use the syntax var.variable_name.
Fix the error in the variable declaration by completing the type definition.
variable "instance_count" { type = [1] default = 3 }
The variable 'instance_count' holds a number, so its type should be 'number'.
Fill both blanks to declare a variable 'tags' as a map of strings with a default.
variable "tags" { type = map[1]string[2] default = { Environment = "dev" } }
Maps in Terraform are declared with map(string) using parentheses.
Fill all three blanks to pass variables 'region', 'instance_count', and 'tags' to the module.
module "app" { source = "./modules/app" region = [1] instance_count = [2] tags = [3] }
Module inputs are assigned using variables with the 'var.' prefix.