HashiCorp VA-002-P Question Answer
Which of the following variable declarations is going to result in an error?
variable "example" {
type = object({})
}
variable "example" {}
description = "This is a test"
type = map
default = {"one" = 1, "two" = 2, "Three" = "3"}
description = "This is a variable description"
type = list(string)
default = {}
Lists are defined with [ ], maps are defined with { }.
https://www.terraform.io/docs/configuration/types.html#structural-types
TESTED 01 Jan 2026
Copyright © 2014-2026 ACE4Sure. All Rights Reserved