azurerm_eventgrid_system_topic_event_subscription

Manages an EventGrid System Topic Event Subscription.

Example Usage

resource "azurerm_resource_group" "example" {
  name     = "example-rg"
  location = "West Europe"
}

resource "azurerm_storage_account" "example" {
  name                     = "examplestorageaccount"
  resource_group_name      = azurerm_resource_group.example.name
  location                 = azurerm_resource_group.example.location
  account_tier             = "Standard"
  account_replication_type = "LRS"

  tags = {
    environment = "staging"
  }
}

resource "azurerm_storage_queue" "example" {
  name                 = "examplestoragequeue"
  storage_account_name = azurerm_storage_account.example.name
}

resource "azurerm_eventgrid_system_topic" "example" {
  name                   = "example-system-topic"
  location               = "Global"
  resource_group_name    = azurerm_resource_group.example.name
  source_arm_resource_id = azurerm_resource_group.example.id
  topic_type             = "Microsoft.Resources.ResourceGroups"
}

resource "azurerm_eventgrid_system_topic_event_subscription" "example" {
  name                = "example-event-subscription"
  system_topic        = azurerm_eventgrid_system_topic.example.name
  resource_group_name = azurerm_resource_group.example.name

  storage_queue_endpoint {
    storage_account_id = azurerm_storage_account.example.id
    queue_name         = azurerm_storage_queue.example.name
  }
}

Arguments Reference

The following arguments are supported:


A storage_queue_endpoint block supports the following:


An azure_function_endpoint block supports the following:


A webhook_endpoint block supports the following:


A subject_filter block supports the following:


A advanced_filter supports the following nested blocks:

Each nested block consists of a key and a value(s) element.

OR


A delivery_identity block supports the following:


A delivery_property block supports the following:


A dead_letter_identity block supports the following:


A storage_blob_dead_letter_destination block supports the following:


A retry_policy block supports the following:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

EventGrid System Topic Event Subscriptions can be imported using the resource id, e.g.

terraform import azurerm_eventgrid_system_topic_event_subscription.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/systemTopics/topic1/eventSubscriptions/subscription1