Skip to content

Commit

Permalink
New Resource: azurerm_servicebus_rule (#1124)
Browse files Browse the repository at this point in the history
* Add AzureRM Servicebus rule module, corresponding tests and documentation

* Minor fixes to the servicebus rule

* Explicitly define the service bus rule in each test

* Set correlation_filter to conflict with sql_filter to prevent both from being set at the same time

* Raise an error when creating a correlation_filter with no properties set in correlation block

* Always return the correlation_filter but only include properties if set

* Rename service_bus_rule to service_bus_subscription_rule to relfect azure portal and dependency on service_bus_subscription

* Update documentation for service bus subscription rule

* Service bus subscription rule: Add validation to rule name, cannot be more than 50 chars

* Fixing the descriptions for the name fields
  • Loading branch information
jpovey authored and tombuildsstuff committed Apr 20, 2018
1 parent 23e5915 commit 014cd6c
Show file tree
Hide file tree
Showing 6 changed files with 941 additions and 5 deletions.
13 changes: 9 additions & 4 deletions azurerm/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,11 @@ type ArmClient struct {
searchServicesClient search.ServicesClient

// ServiceBus
serviceBusQueuesClient servicebus.QueuesClient
serviceBusNamespacesClient servicebus.NamespacesClient
serviceBusTopicsClient servicebus.TopicsClient
serviceBusSubscriptionsClient servicebus.SubscriptionsClient
serviceBusQueuesClient servicebus.QueuesClient
serviceBusNamespacesClient servicebus.NamespacesClient
serviceBusTopicsClient servicebus.TopicsClient
serviceBusSubscriptionsClient servicebus.SubscriptionsClient
serviceBusSubscriptionRulesClient servicebus.RulesClient

//Scheduler
schedulerJobCollectionsClient scheduler.JobCollectionsClient
Expand Down Expand Up @@ -859,6 +860,10 @@ func (c *ArmClient) registerServiceBusClients(endpoint, subscriptionId string, a
subscriptionsClient := servicebus.NewSubscriptionsClientWithBaseURI(endpoint, subscriptionId)
c.configureClient(&subscriptionsClient.Client, auth)
c.serviceBusSubscriptionsClient = subscriptionsClient

subscriptionRulesClient := servicebus.NewRulesClientWithBaseURI(endpoint, subscriptionId)
c.configureClient(&subscriptionRulesClient.Client, auth)
c.serviceBusSubscriptionRulesClient = subscriptionRulesClient
}

func (c *ArmClient) registerSchedulerClients(endpoint, subscriptionId string, auth autorest.Authorizer) {
Expand Down
1 change: 1 addition & 0 deletions azurerm/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ func Provider() terraform.ResourceProvider {
"azurerm_servicebus_namespace": resourceArmServiceBusNamespace(),
"azurerm_servicebus_queue": resourceArmServiceBusQueue(),
"azurerm_servicebus_subscription": resourceArmServiceBusSubscription(),
"azurerm_servicebus_subscription_rule": resourceArmServiceBusSubscriptionRule(),
"azurerm_servicebus_topic": resourceArmServiceBusTopic(),
"azurerm_servicebus_topic_authorization_rule": resourceArmServiceBusTopicAuthorizationRule(),
"azurerm_snapshot": resourceArmSnapshot(),
Expand Down
Loading

0 comments on commit 014cd6c

Please sign in to comment.