In Terraform, how do we define a list of objects?
variables.tf
variable "aws_cluster_arn" {
type = string
}
variable "aws_ecs_placement_strategy" {
type = list(object)
}
in configuration.tfvars
aws_ecs_placement_strategy=(object({type="spread",field="attribute:ecs.availability-zone"}),object({type="BinPack",field="CPU"}))
I am getting following error:
Error: Invalid type specification
on variables.tf line 53, in variable "aws_ecs_placement_strategy":
53: type = list(object)