-
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
rabbitmq: bindings not being stored in state #12782
Comments
Hi @jason-archidera, I'm working on a condensed reproduction for this, but could you confirm that this does not happen with local state? Remote state backends just store a binary blob, so it seems strange that it could return a partial state. |
@jbardin, thanks for looking into this. I'll test that out today and post and update. |
@jbardin, I did the same config with local state and the same behavior occurs. |
Thanks for the update. I'll tag this to look into the provider first, since it's likely not storing the state correctly in the first place. |
@jbardin, I did a simple test and can reproduce with this. BTW, I'm using RabbitMQ v3.6.6.
routing_key = "ANYTHING.#" doesn't store in state. Let me know if you need anything else. |
@jbardin, |
@lmayorga1980, I tested this again with 0.9.3 and it is still not working. bindings with routing_key="#" works fine. Anything other than that and it doesn't store in state. |
Spent a little time looking at this. On line 113, it's failing the '... && binding.PropertiesKey == propertiesKey' check. If I change the binding declaration to below, it works. Basically, the url encoding is goofing things up with the properties_key. Maybe this is an easy fix somewhere in the chain? #CREATE BINDINGS |
A little more commentary, this is probably a 'rabbitmq-ism' since any binding I create modifies the properties key by changing the "#" to "%23". This doesn't seem to be a code change at all, but perhaps some instructions/notes in the RabbitMQ provider documentation. It wasn't apparent and I did not find it documented anywhere, even the RabbitMQ documentation. |
@jason-archidera I believe you are correct. This looks to be a rabbitmq-ism. I found the following mailing list thread which sounds exactly like your scenario: To confirm: when you change your |
I have confirmed the following works for my stack (Terraform 0.9.3 and RabbitMq 3.6.6): It seems the logic is that the binding's properties_key needs to be unique for each queue so based on how a developer is handling routing_keys, it should be verified to ensure it's unique. My config is pretty large so it would be easy to goof it up. |
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. |
I seem to have an issue and it seems to be in saving state.
Version: 0.9
Resource: rabbitmq_binding
I've setup my project with a main.tf:
My modules folder has several tf files and all is well except for any binding with a routing key that isn't "#". For example:
I run the commands, everything seems to work, except for the bindings with anything other than "#" are not stored in the remote state (Consul). This causes each time I run plan or apply, it thinks these bindings are new.
It's either a bug in the RabbitMQ provider or perhaps in state? The interesting part is that the bindings are created in RabbitMQ, but the state is not saved.
The text was updated successfully, but these errors were encountered: