HI,
Encountered an invalid finding on the formatter_trailing_comma rule when a list of objects. Encountered this with a local module.
Broken in to a small test setup:
module/test/variables.tf:
variable "columns" {
type = list(object({
name = string,
type = string,
}))
default = []
description = "XXX"
}
terraform/comma_test.tf:
module "comma_test" {
source = "../comma_test"
columns = [
{ name = "name", type = "string" },
{ name = "code", type = "string" },
]
}
TFLint output:
terraform/comma_test.tf:3:13: Warning - List value should end with a comma (actual: 4, expected: 2) (formatter_trailing_comma)