Worker filter - Unable to successfully parse filter expression in boundary UI targets

I want to create some tags and apply filter in the target so that my worker will only take perticular target and connect

While creating a new target there is a filed to apply worker filter
I am giving tags like work=poc as a key-value pair but it does not allow me to create a tag for the target and I am getting

Optional boolean expression to filter the workers that are allowed to satisfy this request.
X Unable to successfully parse filter expression.

Hi @rajatrj16,

There is a format that must be used when specifying worker filters for targets. The worker filters documentation is a good place to start learning this syntax:

The Target-Aware Workers tutorial also details the construction of these filters in detail, although the CLI is used in the tutorial.

For the example you show, the filter will depend on how you defined the configuration for your worker tags. For example, if the worker tag looked like the following:

  tags {
    work = ["poc"]
  }

The the filter would then look like this:

"poc" in "/tags/work"

The name of the worker could also be used instead of the tags. The docs and tutorial also detail how to define a filter based on the worker’s name.

1 Like