» azurerm_eventgrid_topic

Manages an EventGrid Topic

» Example Usage

resource "azurerm_resource_group" "test" {
  name     = "resourceGroup1"
  location = "West US 2"
}

resource "azurerm_eventgrid_topic" "test" {
  name                = "my-eventgrid-topic"
  location            = "${azurerm_resource_group.test.location}"
  resource_group_name = "${azurerm_resource_group.test.name}"

  tags {
    environment = "Production"
  }
}

» Argument Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the EventGrid Topic resource. Changing this forces a new resource to be created.

  • resource_group_name - (Required) The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.

  • location - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • tags - (Optional) A mapping of tags to assign to the resource.

» Attributes Reference

The following attributes are exported:

  • id - The EventGrid Topic ID.

  • endpoint - The Endpoint associated with the EventGrid Topic.

  • primary_access_key - The Primary Shared Access Key associated with the EventGrid Topic.

  • secondary_access_key - The Secondary Shared Access Key associated with the EventGrid Topic.

» Import

EventGrid Topic's can be imported using the resource id, e.g.

terraform import azurerm_eventgrid_topic.topic1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/topics/topic1