-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
How to bootstrap prepared queries #1956
Comments
Any chance anyone has an idea on this ? |
Hi @johntdyer similar to K/V, prepared queries belong to the cluster and not any individual agent, so they cannot be configured as part of an agent's config file. If you wanted to pre-seed them you'd need to script that outside of Consul with something like |
Are queries idempotent ? Could I run a check looking for a missing query and then readd it incase it somehow ended up "mIssing"? |
You could run a check and add a missing query, but it's a little tricky because you can't control the ID when you create a query. I'm assuming you are giving your queries a Not sure if you are creating queries for a bunch of different services, but perhaps prepared query templates might help you here by defining a single query with a pattern that applies to multiple services; this is new for 0.6.4. |
See #717 (comment) for a possible implementation idea for this. |
Just wanted to drop a note for future readers that the Consul Terraform Provider supports a prepared_query resource that can potentially provide a nice workflow to bootstrap and manage prepared queries, but isn't a direct solution for this ask. |
I would like to bootstrap a cluster to "start" with some prepared queries but the docs only show adding them via the rest API. Is there a way to pre-seed them ? Is there also a way to back them up ?
The text was updated successfully, but these errors were encountered: