Skip to content

Adding a service Bus topic that subscribes to Event Grid for WKS service.

Komal Makkar requested to merge users/komakkar/servicebuswks into master

Infrastructure Submissions:


  • [YES/NO] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [YES/NO] I have updated the documentation accordingly.
  • [YES/NO/NA] I have added tests to cover my changes.
  • [YES/NO/NA] All new and existing tests passed.
  • [YES/NO/NA] I have formatted the terraform code. (terraform fmt -recursive && go fmt ./...)

Current Behavior or Linked Issues


#57 (closed)

As we are going to use Event Grid as the main infrastructure for notification, WKS has to be latched on to it. For the same, following changes are done.

  1. A service bus topic "recordstopiceg" is created under the existing name space.
  2. The service bus topic has a subscriber which WKS service consumes.
  3. The service bus topic is a subscriber to Event Grid.

Does this introduce a breaking change?


  • [YES/NO] No

Other information


This is the current delta Terraform Plan that is produced by this MR. No breaking changes and only adds.

An execution plan has been generated and is shown below.

Resource actions are indicated with the following symbols:

  • create

Terraform will perform the following actions:

azurerm_eventgrid_event_subscription.service_bus_topic_subscriber will be created

  • resource "azurerm_eventgrid_event_subscription" "service_bus_topic_subscriber" {
    • event_delivery_schema = "EventGridSchema"

    • eventhub_endpoint_id = (known after apply)

    • hybrid_connection_endpoint_id = (known after apply)

    • id = (known after apply)

    • included_event_types = (known after apply)

    • name = "servicebusrecordstopic"

    • scope = "/subscriptions/929e9ae0-7bb1-4563-a200-9863fe27cae4/resourceGroups/osdu-mvp-dp1scholl-63vp-rg/providers/Microsoft.EventGrid/topics/osdu-mvp-dp1scho-63vp-grid-recordstopic"

    • service_bus_topic_endpoint_id = (known after apply)

    • topic_name = (known after apply)

    • eventhub_endpoint {

      • eventhub_id = (known after apply) }
    • hybrid_connection_endpoint {

      • hybrid_connection_id = (known after apply) }
    • retry_policy {

      • event_time_to_live = (known after apply)
      • max_delivery_attempts = (known after apply) } }

module.service_bus.azurerm_servicebus_subscription.main[6] will be created

  • resource "azurerm_servicebus_subscription" "main" {
    • auto_delete_on_idle = (known after apply)
    • dead_lettering_on_filter_evaluation_error = true
    • default_message_ttl = (known after apply)
    • id = (known after apply)
    • lock_duration = "PT5M"
    • max_delivery_count = 5
    • name = "eg_sb_wkssubscription"
    • namespace_name = "osdu-mvp-dp1scho-63vp-bus"
    • resource_group_name = "osdu-mvp-dp1scholl-63vp-rg"
    • status = "Active"
    • topic_name = "recordstopiceg" }

module.service_bus.azurerm_servicebus_topic.main[4] will be created

  • resource "azurerm_servicebus_topic" "main" {
    • auto_delete_on_idle = (known after apply)
    • default_message_ttl = (known after apply)
    • duplicate_detection_history_time_window = (known after apply)
    • enable_partitioning = true
    • id = (known after apply)
    • max_size_in_megabytes = (known after apply)
    • name = "recordstopiceg"
    • namespace_name = "osdu-mvp-dp1scho-63vp-bus"
    • resource_group_name = "osdu-mvp-dp1scholl-63vp-rg"
    • status = "Active" }

Plan: 3 to add, 0 to change, 0 to destroy.

Edited by Daniel Scholl

Merge request reports