Filter Format

I am trying to exclude some EC2 instances when importing from AWS.

I am attempting to use the filter expression to ignore instances with a variable set to a certain value.

The variable is defined the properties like this

I have tried all of these variations in the filter expression but the instance still gets imported.
Any suggestions or pointers would be appreciated.

The value I am trying to match is the text string: exclude

Platform!=exclude
vars.Platform!=exclude
${tags.rcs:platform_identity}!=exclude
!(${tags.rcs:platform_identity}=exclude)
tags.rcs:platform_identity!=exclude

Hi @mlevesque1975

Judging by your screenshots, your exclude value lays under a multi-level structure source.
The filter expression does not have any knowledge about nested values. Therefore you will need to provide its value at an earlier stage or to be more precise: during the import logic.

You can do that by defining a modifier at the import source.
Here’s an example for your use case (the modifier method is a required property; just use trim, lowercase or substring in this scenario as you are not interested in actually changing the input string itself):

After doing so, you can just refresh and retrigger the import source and then refer to the newly defined platform variable in your sync rule configuration:

The expression can also be shortened to platform!=exclude

Your sync rule should then be able to properly filter out the unwanted objects.
Let us know if it worked.

Best regards,
Noé

Thanks so much that fixed the issue.
I had to delete the existing instances but it is now not re-importing ones that are flagged with exclude.