-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
[WIP] Consul resources: consul_agent_service, consul_catalog_entry, consul_node, consul_service #3687
Conversation
consul_agent_service
and consul_catalog_entry`
Thanks for working on this! I look forward to being able to use it. 😀 It seems like the pair of resources here is representing an important distinction, but perhaps the subtle difference is lost a bit in the names. Because the first one has "service" in it, it seems like the more attractive choice for someone who knows a little about consul and understands they want to make a service, but I think in many cases it will actually be "catalog entry" that they want. One important use-case for registering services from Terraform would be to register "external services" for managed resources like ElastiCache clusters and RDS instances. That is, resources that internally manage their own HA and thus only change during The
I like the idea of exposing parts of the local agent API to Terraform, and hopefully the |
Hi @apparentlymart thanks for the feedback! One objection I might raise to the name
I don't personally have a good use case for doing this, but since the consul API allows this (via the same Another idea is to just have These are just my 2 cents - I'm happy to go in whatever direction you and others think makes most sense. |
Is there any further updates on this? |
This is looking great so far! Thanks for all the work you have put into this, @maxenglander! Here's my two cents on the resource modeling questions: I think that It seems to me that the |
Ah and the By splitting out separate top level resources for |
Any updates on this? |
Thanks for the feedback @phinze! I worked around the "diffs don't match" issue by changing the "tags" attribute in I'm able to get the new tests working by changing the Consul endpoint from "demo.consul.io" to my own Consul server. Seems when I run the tests locally I don't have permission to add/remove services on "demo.consul.io", although the Travis CI test seems to have passed. One thing @phinze: the Consul API allows you to specify an ID when defining a service. Unfortunately for @phinze @samdunne I haven't had a chance to get started on |
@maxenglander thanks for your work on this! This is something I'm specifically wanting to use, this looks amazing. Wondering if this is something that could get merged as-is and the other features added later? |
Hey @phinze I've created I haven't gotten to Looking forward to your feedback. |
@phinze It would be great if we could get consul_node and consul_service in. Anything else that needs done to get this merged? |
Did this get closed in favor of another PR? |
Sorry @fromonesrc and everyone else who is subscribed to this PR. I irreversibly deleted the previous PR by force-pushing the branch that was the basis of the PR. Luckily, I had the commits available on another branch, so I created a new PR (#7508) from those commits. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Resolves #2087.
consul_agent_service
andconsul_service
correspond to the /agent/service/{deregister,register} API calls.consul_catalog_entry
andconsul_node
correspond to the /catalog/{register,deregister} API calls.Here are some sample configurations:
Hopefully will get documentation and tests finished up this weekend. In the meantime, could use some feedback as well as help with the following issue.When I make any change to aconsul_catalog_entry
resource, I run into the "diffs don't match" issue. This seems to be an issue with thetags
list. The only way I've found around it so far is to make sure that there is always at least one tag in a service definition inconsul_catalog_entry
. Here's a gist of a TF_LOG that will hopefully shed some light on the issue.