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

azurerm_servicebus_subscription_rule adding unwanted filters #1537

Closed
jadamsowers opened this issue Jul 11, 2018 · 1 comment · Fixed by #1565
Closed

azurerm_servicebus_subscription_rule adding unwanted filters #1537

jadamsowers opened this issue Jul 11, 2018 · 1 comment · Fixed by #1565

Comments

@jadamsowers
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.11.6
+ provider.azurerm v1.6.0

Terraform Configuration Files

resource "azurerm_servicebus_subscription_rule" "mysubscriptionrule" {
  name                = "DefaultRule"
  resource_group_name = "${azurerm_resource_group.servicebus.name}"
  namespace_name      = "${azurerm_servicebus_namespace.servicebus.name}"
  topic_name          = "${azurerm_servicebus_topic.mytopic.name}"
  subscription_name   = "${azurerm_servicebus_subscription.mysubscription.name}"
  filter_type         = "CorrelationFilter"

  correlation_filter = {
    label               = "TestSessionStarted"
  }
}

Expected Behavior

A service bus subscription rule (visible in Service Bus Explorer) that looks like:

sys.Label = 'TestSessionStarted'

Actual Behavior

Subscription rule contains every possible correlation filter with most attempting to match an empty string:

sys.CorrelationId = '' And sys.MessageId = '' And sys.To = '' And sys.ReplyTo = '' And sys.Label = 'TestSessionStarted' And sys.SessionId = '' And sys.ReplyToSessionId = '' And sys.ContentType = ''

No messages will match.

Steps to Reproduce

  1. terraform apply
stack72 added a commit to stack72/terraform-provider-azurerm that referenced this issue Jul 13, 2018
…ional values

Fixes: hashicorp#1537

This was a simple fix to make sure that we were not passing empty strings
to the API. When passing empty strings, it was including those strings
in the subscription rule

We should only set the part of the rule if it is required as, technically,
a rule of sys.To = `` is actually value
tombuildsstuff pushed a commit that referenced this issue Jul 13, 2018
…ional values (#1565)

Fixes: #1537

This was a simple fix to make sure that we were not passing empty strings
to the API. When passing empty strings, it was including those strings
in the subscription rule

We should only set the part of the rule if it is required as, technically,
a rule of sys.To = `` is actually value
@ghost
Copy link

ghost commented Mar 30, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants