Hashicorp Certified Consul Associate 002 · Free Practice Question Medium
Question 3
Based on the payload below, what Consul feature is being created with the API?
- {
- "Name": "db-service",
- "Session": "adf4238a-882b-9ddc-4a9d-5b6758e4159e",
- "Token": "",
- "Service": {
- "Service": "redis",
- "Failover": {
- "NearestN": 3,
- "Datacenters": ["dc1", "dc2"]
- },
- "Near": "node1",
- "OnlyPassing": false,
- "Tags": ["primary", "!experimental"],
- "NodeMeta": { "instance_type": "m3.large" },
- "ServiceMeta": { "environment": "production" }
- },
- "DNS": {
- "TTL": "10s"
- }
- }
-
A
service
-
B
Consul agent
-
C
service mesh intention
-
D
prepared query
Reveal correct answer
Correct answer: D
Explanation
The payload in the question is the configuration of a prepared query. You can immediately tell that it's a prepared query since it includes a failover policy as well. Failover policies are only configured in a prepared query.
https://developer.hashicorp.com/consul/api-docs/query#create-prepared-query
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
You must be logged in to post a comment.
