'Creating variable in input_transformer in terraform

Suppose we have the following:

input_transformer {
    input_paths = {
      count = "$.detail.payload.Count",
      is_empty = var.count > 0 ? True : False
    }
    input_template = <<EOF
{
  "Count": <count>,
  "Empty": <is_empty>,
  
}
EOF
  }"

Why do I get the following error message:

 A reference to a resource type must be followed by at least one attribute
access, specifying the resource name.

when trying to create the variable is_empty? Is this the correct way of creating the variable?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source