Error using dimension_values with a filter


I’m trying to define a variable with the list of load balancers for a given application (defined as another variable) using the following query:

dimension_values(us-east-1, AWS/ApplicationELB, HealthyHostCount, LoadBalancer, {"tag:app": ["$application"]})

But I’m getting the following error:

Template variables could not be initialized: t.replace is not a function

Removing the filter works, so it seams clear the issue is the filter.

I managed to use a similar query for retrieving the list of EC2 instances using this query:

ec2_instance_attribute(us-east-1, InstanceId, {"tag:app": ["$application"]})

On a side note, I’m struggling to understand why this function requires specifying a metric.

I believe by using the dimension_values query you are only getting what is available in CloudWatch, and tags are not available in the ELB CloudWatch data, only LoadBalancerName, and I think Region.