Skip to content

Adding Secret for Event Grid Topic Primary Keys for Storage Service.

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

Infrastructure Submissions:


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

Current Behavior or Linked Issues


Storage service will be publishing to both Service Bus and Event Grid. The Event Grid publish event operation requires the access key. The primary key for the event grid topic is added to the KeyVault as a secret. The name of the key contains the partition information as well.

#62 (closed)

Does this introduce a breaking change?


  • [YES/NO] No

Other information


Terraform Plan

Terraform will perform the following actions:

azurerm_eventgrid_event_subscription.service_bus_topic_subscriber will be destroyed

  • resource "azurerm_eventgrid_event_subscription" "service_bus_topic_subscriber" {
    • event_delivery_schema = "EventGridSchema" -> null

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

    • included_event_types = [] -> null

    • labels = [] -> null

    • name = "servicebusrecordstopic" -> null

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

    • service_bus_topic_endpoint_id = "/subscriptions/929e9ae0-7bb1-4563-a200-9863fe27cae4/resourceGroups/osdu-mvp-dp1scholl-63vp-rg/providers/Microsoft.ServiceBus/namespaces/osdu-mvp-dp1scho-63vp-bus/topics/recordstopiceg" -> null

    • retry_policy {

      • event_time_to_live = 1440 -> null
      • max_delivery_attempts = 30 -> null } }

azurerm_key_vault_secret.eventgrid_topic_key will be created

  • resource "azurerm_key_vault_secret" "eventgrid_topic_key" {
    • id = (known after apply)
    • key_vault_id = "/subscriptions/929e9ae0-7bb1-4563-a200-9863fe27cae4/resourceGroups/osdu-mvp-crscholl-c60p-rg/providers/Microsoft.KeyVault/vaults/osdu-mvp-crschol-c60p-kv"
    • name = "opendes-eventgrid-recordstopic-accesskey"
    • value = (sensitive value)
    • version = (known after apply) }

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

  • resource "azurerm_servicebus_subscription" "main" {
    • auto_delete_on_idle = "P10675199DT2H48M5.4775807S" -> null
    • dead_lettering_on_filter_evaluation_error = true -> null
    • dead_lettering_on_message_expiration = false -> null
    • default_message_ttl = "P10675199DT2H48M5.4775807S" -> null
    • enable_batched_operations = false -> null
    • id = "/subscriptions/929e9ae0-7bb1-4563-a200-9863fe27cae4/resourceGroups/osdu-mvp-dp1scholl-63vp-rg/providers/Microsoft.ServiceBus/namespaces/osdu-mvp-dp1scho-63vp-bus/topics/recordstopiceg/subscriptions/eg_sb_wkssubscription" -> null
    • lock_duration = "PT5M" -> null
    • max_delivery_count = 5 -> null
    • name = "eg_sb_wkssubscription" -> null
    • namespace_name = "osdu-mvp-dp1scho-63vp-bus" -> null
    • requires_session = false -> null
    • resource_group_name = "osdu-mvp-dp1scholl-63vp-rg" -> null
    • status = "Active" -> null
    • topic_name = "recordstopiceg" -> null }

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

  • resource "azurerm_servicebus_topic" "main" {
    • auto_delete_on_idle = "P10675199DT2H48M5.4775807S" -> null
    • default_message_ttl = "P10675199DT2H48M5.4775807S" -> null
    • duplicate_detection_history_time_window = "PT10M" -> null
    • enable_batched_operations = false -> null
    • enable_express = false -> null
    • enable_partitioning = true -> null
    • id = "/subscriptions/929e9ae0-7bb1-4563-a200-9863fe27cae4/resourceGroups/osdu-mvp-dp1scholl-63vp-rg/providers/Microsoft.ServiceBus/namespaces/osdu-mvp-dp1scho-63vp-bus/topics/recordstopiceg" -> null
    • max_size_in_megabytes = 5120 -> null
    • name = "recordstopiceg" -> null
    • namespace_name = "osdu-mvp-dp1scho-63vp-bus" -> null
    • requires_duplicate_detection = false -> null
    • resource_group_name = "osdu-mvp-dp1scholl-63vp-rg" -> null
    • status = "Active" -> null
    • support_ordering = false -> null }

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

Edited by Daniel Scholl

Merge request reports

Loading