diff --git a/internal/services/eventgrid/eventgrid_system_topic_event_subscription_resource.go b/internal/services/eventgrid/eventgrid_system_topic_event_subscription_resource.go index 0aeccc159ce9..59f673786ad5 100644 --- a/internal/services/eventgrid/eventgrid_system_topic_event_subscription_resource.go +++ b/internal/services/eventgrid/eventgrid_system_topic_event_subscription_resource.go @@ -129,6 +129,8 @@ func resourceEventGridSystemTopicEventSubscription() *pluginsdk.Resource { "labels": eventSubscriptionSchemaLabels(), "advanced_filtering_on_arrays_enabled": eventSubscriptionSchemaEnableAdvancedFilteringOnArrays(), + + "delivery_property": eventSubscriptionSchemaDeliveryProperty(), }, } } @@ -275,16 +277,34 @@ func resourceEventGridSystemTopicEventSubscriptionRead(d *pluginsdk.ResourceData if err := d.Set("azure_function_endpoint", flattenEventGridEventSubscriptionAzureFunctionEndpoint(azureFunctionEndpoint)); err != nil { return fmt.Errorf("setting `azure_function_endpoint`: %+v", err) } + if azureFunctionEndpoint.DeliveryAttributeMappings != nil { + if err := d.Set("delivery_property", flattenDeliveryProperties(d, azureFunctionEndpoint.DeliveryAttributeMappings)); err != nil { + return fmt.Errorf("setting `%q` for EventGrid SystemTopic delivery properties %q: %s", "azure_function_endpoint", id.EventSubscriptionName, err) + } + } } if v, ok := destination.AsEventHubEventSubscriptionDestination(); ok { if err := d.Set("eventhub_endpoint_id", v.ResourceID); err != nil { return fmt.Errorf("setting `eventhub_endpoint_id`: %+v", err) } + + if v.DeliveryAttributeMappings != nil { + if err := d.Set("delivery_property", flattenDeliveryProperties(d, v.DeliveryAttributeMappings)); err != nil { + return fmt.Errorf("setting `%q` for EventGrid SystemTopic delivery properties %q: %s", "eventhub_endpoint", id.EventSubscriptionName, err) + } + } } if v, ok := destination.AsHybridConnectionEventSubscriptionDestination(); ok { if err := d.Set("hybrid_connection_endpoint_id", v.ResourceID); err != nil { return fmt.Errorf("setting `hybrid_connection_endpoint_id`: %+v", err) } + + if v.DeliveryAttributeMappings != nil { + if err := d.Set("delivery_property", flattenDeliveryProperties(d, v.DeliveryAttributeMappings)); err != nil { + return fmt.Errorf("setting `%q` for EventGrid SystemTopic delivery properties %q: %s", "hybrid_connection_endpoint", id.EventSubscriptionName, err) + } + } + } if serviceBusQueueEndpoint, ok := destination.AsServiceBusQueueEventSubscriptionDestination(); ok { if err := d.Set("service_bus_queue_endpoint_id", serviceBusQueueEndpoint.ResourceID); err != nil { @@ -295,6 +315,11 @@ func resourceEventGridSystemTopicEventSubscriptionRead(d *pluginsdk.ResourceData if err := d.Set("service_bus_topic_endpoint_id", serviceBusTopicEndpoint.ResourceID); err != nil { return fmt.Errorf("setting `service_bus_topic_endpoint_id`: %+v", err) } + if serviceBusTopicEndpoint.DeliveryAttributeMappings != nil { + if err := d.Set("delivery_property", flattenDeliveryProperties(d, serviceBusTopicEndpoint.DeliveryAttributeMappings)); err != nil { + return fmt.Errorf("setting `%q` for EventGrid SystemTopic delivery properties %q: %s", "service_bus_topic_endpoint_id", id.EventSubscriptionName, err) + } + } } if v, ok := destination.AsStorageQueueEventSubscriptionDestination(); ok { if err := d.Set("storage_queue_endpoint", flattenEventGridEventSubscriptionStorageQueueEndpoint(v)); err != nil { @@ -309,6 +334,11 @@ func resourceEventGridSystemTopicEventSubscriptionRead(d *pluginsdk.ResourceData if err := d.Set("webhook_endpoint", flattenEventGridEventSubscriptionWebhookEndpoint(v, &fullURL)); err != nil { return fmt.Errorf("setting `webhook_endpoint`: %+v", err) } + if v.DeliveryAttributeMappings != nil { + if err := d.Set("delivery_property", flattenDeliveryProperties(d, v.DeliveryAttributeMappings)); err != nil { + return fmt.Errorf("setting `%q` for EventGrid SystemTopic delivery properties %q: %s", "webhook_endpoint", id.EventSubscriptionName, err) + } + } } deadLetterDestination := props.DeadLetterDestination diff --git a/internal/services/eventgrid/eventgrid_system_topic_event_subscription_resource_test.go b/internal/services/eventgrid/eventgrid_system_topic_event_subscription_resource_test.go index 5b4eeb205f2d..9ad600cc98e5 100644 --- a/internal/services/eventgrid/eventgrid_system_topic_event_subscription_resource_test.go +++ b/internal/services/eventgrid/eventgrid_system_topic_event_subscription_resource_test.go @@ -266,6 +266,161 @@ func TestAccEventGridSystemTopicEventSubscription_userIdentity(t *testing.T) { }) } +func TestAccEventGridSystemTopicEventSubscription_deliveryPropertiesStatic(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_eventgrid_system_topic_event_subscription", "test") + r := EventGridSystemTopicEventSubscriptionResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.deliveryProperties(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + + check.That(data.ResourceName).Key("delivery_property.0.header_name").HasValue("test-1"), + check.That(data.ResourceName).Key("delivery_property.0.type").HasValue("Static"), + check.That(data.ResourceName).Key("delivery_property.0.value").HasValue("1"), + check.That(data.ResourceName).Key("delivery_property.0.secret").HasValue("false"), + + check.That(data.ResourceName).Key("delivery_property.1.header_name").HasValue("test-2"), + check.That(data.ResourceName).Key("delivery_property.1.type").HasValue("Static"), + check.That(data.ResourceName).Key("delivery_property.1.value").HasValue("string"), + check.That(data.ResourceName).Key("delivery_property.1.secret").HasValue("false"), + ), + }, + data.ImportStep(), + }) +} + +func TestAccEventGridSystemTopicEventSubscription_deliveryPropertiesSecret(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_eventgrid_system_topic_event_subscription", "test") + r := EventGridSystemTopicEventSubscriptionResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.deliveryPropertiesSecret(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + + check.That(data.ResourceName).Key("delivery_property.0.header_name").HasValue("test-secret-1"), + check.That(data.ResourceName).Key("delivery_property.0.type").HasValue("Static"), + check.That(data.ResourceName).Key("delivery_property.0.secret").HasValue("true"), + ), + }, + data.ImportStep("delivery_property.0.value"), + }) +} + +func TestAccEventGridSystemTopicEventSubscription_deliveryPropertiesMixed(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_eventgrid_system_topic_event_subscription", "test") + r := EventGridSystemTopicEventSubscriptionResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.deliveryPropertiesWithMultipleTypes(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + + check.That(data.ResourceName).Key("delivery_property.0.header_name").HasValue("test-static-1"), + check.That(data.ResourceName).Key("delivery_property.0.type").HasValue("Static"), + check.That(data.ResourceName).Key("delivery_property.0.value").HasValue("1"), + check.That(data.ResourceName).Key("delivery_property.0.secret").HasValue("false"), + + check.That(data.ResourceName).Key("delivery_property.1.header_name").HasValue("test-dynamic-1"), + check.That(data.ResourceName).Key("delivery_property.1.type").HasValue("Dynamic"), + check.That(data.ResourceName).Key("delivery_property.1.source_field").HasValue("data.system"), + + check.That(data.ResourceName).Key("delivery_property.2.header_name").HasValue("test-secret-1"), + check.That(data.ResourceName).Key("delivery_property.2.type").HasValue("Static"), + check.That(data.ResourceName).Key("delivery_property.2.secret").HasValue("true"), + check.That(data.ResourceName).Key("delivery_property.2.value").HasValue("this-value-is-secret!"), + ), + }, + data.ImportStep("delivery_property.2.value"), + }) +} + +func TestAccEventGridSystemTopicEventSubscription_deliveryPropertiesUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_eventgrid_system_topic_event_subscription", "test") + r := EventGridSystemTopicEventSubscriptionResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.deliveryPropertiesWithMultipleTypes(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("delivery_property.0.header_name").HasValue("test-static-1"), + check.That(data.ResourceName).Key("delivery_property.0.type").HasValue("Static"), + check.That(data.ResourceName).Key("delivery_property.0.value").HasValue("1"), + check.That(data.ResourceName).Key("delivery_property.0.secret").HasValue("false"), + check.That(data.ResourceName).Key("delivery_property.1.header_name").HasValue("test-dynamic-1"), + check.That(data.ResourceName).Key("delivery_property.1.type").HasValue("Dynamic"), + check.That(data.ResourceName).Key("delivery_property.1.source_field").HasValue("data.system"), + check.That(data.ResourceName).Key("delivery_property.2.header_name").HasValue("test-secret-1"), + check.That(data.ResourceName).Key("delivery_property.2.type").HasValue("Static"), + check.That(data.ResourceName).Key("delivery_property.2.secret").HasValue("true"), + check.That(data.ResourceName).Key("delivery_property.2.value").HasValue("this-value-is-secret!"), + ), + }, + { + Config: r.deliveryPropertiesUpdate(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("delivery_property.0.header_name").HasValue("test-static-1"), + check.That(data.ResourceName).Key("delivery_property.0.type").HasValue("Static"), + check.That(data.ResourceName).Key("delivery_property.0.value").HasValue("2"), + check.That(data.ResourceName).Key("delivery_property.0.secret").HasValue("false"), + check.That(data.ResourceName).Key("delivery_property.1.header_name").HasValue("test-dynamic-1"), + check.That(data.ResourceName).Key("delivery_property.1.type").HasValue("Dynamic"), + check.That(data.ResourceName).Key("delivery_property.1.source_field").HasValue("data.topic"), + check.That(data.ResourceName).Key("delivery_property.2.header_name").HasValue("test-secret-1"), + check.That(data.ResourceName).Key("delivery_property.2.type").HasValue("Static"), + check.That(data.ResourceName).Key("delivery_property.2.secret").HasValue("true"), + check.That(data.ResourceName).Key("delivery_property.2.value").HasValue("this-value-is-still-secret!"), + ), + }, + }) +} + +func TestAccEventGridSystemTopicEventSubscription_deliveryPropertiesForEventHubs(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_eventgrid_system_topic_event_subscription", "test") + r := EventGridSystemTopicEventSubscriptionResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.deliveryPropertiesForEventHubs(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + + check.That(data.ResourceName).Key("delivery_property.0.header_name").HasValue("test-static-1"), + check.That(data.ResourceName).Key("delivery_property.0.type").HasValue("Static"), + check.That(data.ResourceName).Key("delivery_property.0.value").HasValue("1"), + check.That(data.ResourceName).Key("delivery_property.0.secret").HasValue("false"), + ), + }, + data.ImportStep(), + }) +} + +func TestAccEventGridSystemTopicEventSubscription_deliveryPropertiesHybridRelay(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_eventgrid_system_topic_event_subscription", "test") + r := EventGridSystemTopicEventSubscriptionResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.deliveryPropertiesForHybridRelay(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + + check.That(data.ResourceName).Key("delivery_property.0.header_name").HasValue("test-static-1"), + check.That(data.ResourceName).Key("delivery_property.0.type").HasValue("Static"), + check.That(data.ResourceName).Key("delivery_property.0.value").HasValue("1"), + check.That(data.ResourceName).Key("delivery_property.0.secret").HasValue("false"), + ), + }, + data.ImportStep(), + }) +} + func (EventGridSystemTopicEventSubscriptionResource) Exists(ctx context.Context, clients *clients.Client, state *terraform.InstanceState) (*bool, error) { id, err := parse.SystemTopicEventSubscriptionID(state.ID) if err != nil { @@ -691,8 +846,7 @@ resource "azurerm_servicebus_namespace" "example" { resource "azurerm_servicebus_queue" "test" { name = "acctestservicebusqueue-%[1]d" - resource_group_name = azurerm_resource_group.test.name - namespace_name = azurerm_servicebus_namespace.example.name + namespace_id = azurerm_servicebus_namespace.example.id enable_partitioning = true } @@ -735,8 +889,7 @@ resource "azurerm_servicebus_namespace" "example" { resource "azurerm_servicebus_topic" "test" { name = "acctestservicebustopic-%[1]d" - resource_group_name = azurerm_resource_group.test.name - namespace_name = azurerm_servicebus_namespace.example.name + namespace_id = azurerm_servicebus_namespace.example.id enable_partitioning = true } @@ -1266,3 +1419,357 @@ resource "azurerm_eventgrid_system_topic_event_subscription" "test" { } `, data.RandomInteger, data.Locations.Primary, data.RandomString) } + +func (EventGridSystemTopicEventSubscriptionResource) deliveryProperties(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-eg-%[1]d" + location = "%[2]s" +} + +resource "azurerm_servicebus_namespace" "example" { + name = "acctestservicebusnamespace-%[1]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + sku = "Standard" +} + +resource "azurerm_servicebus_topic" "test" { + name = "acctestservicebustopic-%[1]d" + namespace_id = azurerm_servicebus_namespace.example.id + enable_partitioning = true +} + +resource "azurerm_eventgrid_system_topic" "test" { + name = "acctesteg-%[1]d" + location = "Global" + resource_group_name = azurerm_resource_group.test.name + source_arm_resource_id = azurerm_resource_group.test.id + topic_type = "Microsoft.Resources.ResourceGroups" +} + +resource "azurerm_eventgrid_system_topic_event_subscription" "test" { + name = "acctesteg-%[1]d" + system_topic = azurerm_eventgrid_system_topic.test.name + resource_group_name = azurerm_resource_group.test.name + + service_bus_topic_endpoint_id = azurerm_servicebus_topic.test.id + + advanced_filtering_on_arrays_enabled = true + + subject_filter { + subject_begins_with = "test/test" + } + + delivery_property { + header_name = "test-1" + type = "Static" + value = "1" + secret = false + } + + delivery_property { + header_name = "test-2" + type = "Static" + value = "string" + secret = false + } + +} +`, data.RandomInteger, data.Locations.Primary, data.RandomString) +} + +func (EventGridSystemTopicEventSubscriptionResource) deliveryPropertiesSecret(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-eg-%[1]d" + location = "%[2]s" +} + +resource "azurerm_servicebus_namespace" "example" { + name = "acctestservicebusnamespace-%[1]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + sku = "Standard" +} + +resource "azurerm_servicebus_topic" "test" { + name = "acctestservicebustopic-%[1]d" + namespace_id = azurerm_servicebus_namespace.example.id + enable_partitioning = true +} + +resource "azurerm_eventgrid_system_topic" "test" { + name = "acctesteg-%[1]d" + location = "Global" + resource_group_name = azurerm_resource_group.test.name + source_arm_resource_id = azurerm_resource_group.test.id + topic_type = "Microsoft.Resources.ResourceGroups" +} + +resource "azurerm_eventgrid_system_topic_event_subscription" "test" { + name = "acctesteg-%[1]d" + system_topic = azurerm_eventgrid_system_topic.test.name + resource_group_name = azurerm_resource_group.test.name + + service_bus_topic_endpoint_id = azurerm_servicebus_topic.test.id + + advanced_filtering_on_arrays_enabled = true + + subject_filter { + subject_begins_with = "test/test" + } + + delivery_property { + header_name = "test-secret-1" + type = "Static" + value = "1" + secret = true + } +} +`, data.RandomInteger, data.Locations.Primary, data.RandomString) +} + +func (EventGridSystemTopicEventSubscriptionResource) deliveryPropertiesWithMultipleTypes(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-eg-%[1]d" + location = "%[2]s" +} + +resource "azurerm_servicebus_namespace" "example" { + name = "acctestservicebusnamespace-%[1]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + sku = "Standard" +} + +resource "azurerm_servicebus_topic" "test" { + name = "acctestservicebustopic-%[1]d" + namespace_id = azurerm_servicebus_namespace.example.id + enable_partitioning = true +} + +resource "azurerm_eventgrid_system_topic" "test" { + name = "acctesteg-%[1]d" + location = "Global" + resource_group_name = azurerm_resource_group.test.name + source_arm_resource_id = azurerm_resource_group.test.id + topic_type = "Microsoft.Resources.ResourceGroups" +} + +resource "azurerm_eventgrid_system_topic_event_subscription" "test" { + name = "acctesteg-%[1]d" + system_topic = azurerm_eventgrid_system_topic.test.name + resource_group_name = azurerm_resource_group.test.name + + service_bus_topic_endpoint_id = azurerm_servicebus_topic.test.id + + advanced_filtering_on_arrays_enabled = true + + subject_filter { + subject_begins_with = "test/test" + } + + delivery_property { + header_name = "test-static-1" + type = "Static" + value = "1" + secret = false + } + + delivery_property { + header_name = "test-dynamic-1" + type = "Dynamic" + source_field = "data.system" + } + + delivery_property { + header_name = "test-secret-1" + type = "Static" + value = "this-value-is-secret!" + secret = true + } +} +`, data.RandomInteger, data.Locations.Primary, data.RandomString) +} + +func (EventGridSystemTopicEventSubscriptionResource) deliveryPropertiesUpdate(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-eg-%[1]d" + location = "%[2]s" +} + +resource "azurerm_servicebus_namespace" "example" { + name = "acctestservicebusnamespace-%[1]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + sku = "Standard" +} + +resource "azurerm_servicebus_topic" "test" { + name = "acctestservicebustopic-%[1]d" + namespace_id = azurerm_servicebus_namespace.example.id + enable_partitioning = true +} + +resource "azurerm_eventgrid_system_topic" "test" { + name = "acctesteg-%[1]d" + location = "Global" + resource_group_name = azurerm_resource_group.test.name + source_arm_resource_id = azurerm_resource_group.test.id + topic_type = "Microsoft.Resources.ResourceGroups" +} + +resource "azurerm_eventgrid_system_topic_event_subscription" "test" { + name = "acctesteg-%[1]d" + system_topic = azurerm_eventgrid_system_topic.test.name + resource_group_name = azurerm_resource_group.test.name + + service_bus_topic_endpoint_id = azurerm_servicebus_topic.test.id + + advanced_filtering_on_arrays_enabled = true + + subject_filter { + subject_begins_with = "test/test" + } + + delivery_property { + header_name = "test-static-1" + type = "Static" + value = "2" + secret = false + } + + delivery_property { + header_name = "test-dynamic-1" + type = "Dynamic" + source_field = "data.topic" + } + + delivery_property { + header_name = "test-secret-1" + type = "Static" + value = "this-value-is-still-secret!" + secret = true + } +} +`, data.RandomInteger, data.Locations.Primary, data.RandomString) +} + +func (EventGridSystemTopicEventSubscriptionResource) deliveryPropertiesForEventHubs(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-eg-%[1]d" + location = "%[2]s" +} + +resource "azurerm_eventhub_namespace" "test" { + name = "acctesteventhubnamespace-%[1]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + sku = "Basic" +} + +resource "azurerm_eventhub" "test" { + name = "acctesteventhub-%[1]d" + namespace_name = azurerm_eventhub_namespace.test.name + resource_group_name = azurerm_resource_group.test.name + partition_count = 2 + message_retention = 1 +} + +resource "azurerm_eventgrid_system_topic" "test" { + name = "acctesteg-%[1]d" + location = "Global" + resource_group_name = azurerm_resource_group.test.name + source_arm_resource_id = azurerm_resource_group.test.id + topic_type = "Microsoft.Resources.ResourceGroups" +} + +resource "azurerm_eventgrid_system_topic_event_subscription" "test" { + name = "acctesteg-%[1]d" + system_topic = azurerm_eventgrid_system_topic.test.name + resource_group_name = azurerm_resource_group.test.name + + eventhub_endpoint_id = azurerm_eventhub.test.id + + delivery_property { + header_name = "test-static-1" + type = "Static" + value = "1" + } +} +`, data.RandomInteger, data.Locations.Primary) +} + +func (EventGridSystemTopicEventSubscriptionResource) deliveryPropertiesForHybridRelay(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-eg-%[1]d" + location = "%[2]s" +} + +resource "azurerm_relay_namespace" "test" { + name = "acctest-%[1]d-rly-eventsub-repo" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + + sku_name = "Standard" +} + +resource "azurerm_relay_hybrid_connection" "test" { + name = "acctest-%[1]d-rhc-eventsub-repo" + resource_group_name = azurerm_resource_group.test.name + relay_namespace_name = azurerm_relay_namespace.test.name + requires_client_authorization = false +} + +resource "azurerm_eventgrid_system_topic" "test" { + name = "acctesteg-%[1]d" + location = "Global" + resource_group_name = azurerm_resource_group.test.name + source_arm_resource_id = azurerm_resource_group.test.id + topic_type = "Microsoft.Resources.ResourceGroups" +} + +resource "azurerm_eventgrid_system_topic_event_subscription" "test" { + name = "acctesteg-%[1]d" + system_topic = azurerm_eventgrid_system_topic.test.name + resource_group_name = azurerm_resource_group.test.name + + hybrid_connection_endpoint_id = azurerm_relay_hybrid_connection.test.id + + delivery_property { + header_name = "test-static-1" + type = "Static" + value = "1" + } +} +`, data.RandomInteger, data.Locations.Primary) +} diff --git a/website/docs/r/eventgrid_system_topic_event_subscription.html.markdown b/website/docs/r/eventgrid_system_topic_event_subscription.html.markdown index 47f03dfc8c72..ecd6ece2d9ce 100644 --- a/website/docs/r/eventgrid_system_topic_event_subscription.html.markdown +++ b/website/docs/r/eventgrid_system_topic_event_subscription.html.markdown @@ -83,7 +83,7 @@ The following arguments are supported: * `webhook_endpoint` - (Optional) A `webhook_endpoint` block as defined below. -~> **NOTE:** One of `eventhub_endpoint`, `eventhub_endpoint_id`, `hybrid_connection_endpoint`, `hybrid_connection_endpoint_id`, `service_bus_queue_endpoint_id`, `service_bus_topic_endpoint_id`, `storage_queue_endpoint` or `webhook_endpoint` must be specified. +~> **NOTE:** One of `azure_function_endpoint`, `eventhub_endpoint_id`, `hybrid_connection_endpoint`, `hybrid_connection_endpoint_id`, `service_bus_queue_endpoint_id`, `service_bus_topic_endpoint_id`, `storage_queue_endpoint` or `webhook_endpoint` must be specified. * `included_event_types` - (Optional) A list of applicable event types that need to be part of the event subscription. @@ -93,6 +93,8 @@ The following arguments are supported: * `delivery_identity` - (Optional) A `delivery_identity` block as defined below. +* `delivery_property` - (Optional) A `delivery_property` block as defined below. + * `dead_letter_identity` - (Optional) A `dead_letter_identity` block as defined below. -> **Note:** `storage_blob_dead_letter_destination` must be specified when a `dead_letter_identity` is specified @@ -197,6 +199,22 @@ A `delivery_identity` supports the following: --- +A `delivery_property` supports the following: + +~> **NOTE:** `delivery_property` blocks are only effective when using an `azure_function_endpoint`, `eventhub_endpoint_id`, `hybrid_connection_endpoint_id`, `service_bus_topic_endpoint_id`, or `webhook_endpoint` endpoint specification. + +* `header_name` - (Required) The name of the header to send on to the destination. + +* `type` - (Required) Either `Static` or `Dynamic`. + +* `value` - (Optional) If the `type` is `Static`, then provide the value to use. + +* `source_field` - (Optional) If the `type` is `Dynamic`, then provide the payload field to be used as the value. Valid source fields differ by subscription type. + +* `secret` - (Optional) Set to `true` if the `value` is a secret and should be protected, otherwise `false`. If `true` then this value won't be returned from Azure API calls. + +--- + A `dead_letter_identity` supports the following: * `type` - (Required) Specifies the type of Managed Service Identity that is used for dead lettering. Allowed value is `SystemAssigned`, `UserAssigned`.