Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Templating in Rules #12

Open
dallinb opened this issue Dec 13, 2024 · 0 comments
Open

Allow Templating in Rules #12

dallinb opened this issue Dec 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@dallinb
Copy link
Contributor

dallinb commented Dec 13, 2024

Templates may be repetitive, but the differences may be environmental. Therefore it makes sense to be able to template rules. For example, if a rule looks like this:

{ "destination_namespaces": "", "destination_topics": "", "jmespath": "country", "regexp": "^{ISO_3166_1_ALPHA_2}$", "source_subscription": "test", "source_topic": "topic.1"}

and there was an environment variable set called ISO_3166_1_ALPHA_2 that was set to FR then the resulting rule would be:

{ "destination_namespaces": "", "destination_topics": "", "jmespath": "country", "regexp": "^FR$", "source_subscription": "test", "source_topic": "topic.1"}
@dallinb dallinb added the enhancement New feature or request label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant