terraform_validate icon indicating copy to clipboard operation
terraform_validate copied to clipboard

Make enable_variable_expansion works with list

Open ccronca opened this issue 6 years ago • 0 comments

Enabling variable expansion when the default value of a property is a list will fail:

variable "list" {
  default     = []
}
resource ... {
  name = "${var.list}"
}
  File "/usr/local/lib/python2.7/site-packages/terraform_validate/terraform_validate.py", line 520, in substitute_variable_values_in_string
    s = s.replace("${" + variable + "}",variable_default_value)
TypeError: coercing to Unicode: need string or buffer, list found

ccronca avatar Nov 30 '18 14:11 ccronca