Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add delivery_property to azurerm_eventgrid_system_topic_event_subscription #15559

Merged
merged 24 commits into from
Mar 14, 2022
Merged
Changes from 3 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6b8dfae
add delivery_property
jackmuskopf Feb 22, 2022
ab32ca4
Remove `Scope` attr
jackmuskopf Feb 22, 2022
570de4d
fix azureFunctionEndpoint stmt and field Name -> EventSubscriptionName
jackmuskopf Feb 23, 2022
ac82485
static test
jackmuskopf Mar 3, 2022
2f5fb7a
mixed test
jackmuskopf Mar 3, 2022
57fc70e
docs
jackmuskopf Mar 3, 2022
a2ccb51
secret
jackmuskopf Mar 3, 2022
0db582e
use service bus
jackmuskopf Mar 4, 2022
f3cbe45
update, eventhub, hybrid
jackmuskopf Mar 4, 2022
ac2bd78
fix class and method names
jackmuskopf Mar 4, 2022
98f05a8
eventhub_endpoint block dne, but azure_function_endpoint can be defin…
jackmuskopf Mar 4, 2022
fefe906
Merge pull request #1 from jackmuskopf/acctest
jackmuskopf Mar 4, 2022
d91158e
add hybrid connection id
jackmuskopf Mar 4, 2022
fbce143
Merge branch 'main' of github.com:jackmuskopf/terraform-provider-azurerm
jackmuskopf Mar 4, 2022
21a196f
Add period to end of description
jackmuskopf Mar 7, 2022
31bec75
Add period to end of description
jackmuskopf Mar 7, 2022
3c42298
Add period to end of description
jackmuskopf Mar 7, 2022
6489f05
Use ticks to indicate boolean value
jackmuskopf Mar 7, 2022
c206585
terrafmt applied to internal/services/eventgrid/eventgrid_system_topi…
jackmuskopf Mar 7, 2022
1b8a9cd
fix for 3.0 beta errors
jackmuskopf Mar 11, 2022
a724d64
terrafmt changes
jackmuskopf Mar 11, 2022
f0f53ec
rm rgname
jackmuskopf Mar 11, 2022
bb4c30a
eventhub still uses namespace_name
jackmuskopf Mar 11, 2022
608e15a
Merge pull request #3 from jackmuskopf/acctest
jackmuskopf Mar 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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