Skip to content

Commit

Permalink
azurerm_web_pubsub_hub - modify event handler type from typeSet to …
Browse files Browse the repository at this point in the history
…TypeList to respect the user's input order (#19886)

fix #19876
  • Loading branch information
xiaxyi authored Jan 10, 2023
1 parent cd32e7d commit e30d429
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/services/signalr/web_pubsub_hub_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func resourceWebPubSubHub() *pluginsdk.Resource {
"web_pubsub_id": commonschema.ResourceIDReferenceRequiredForceNew(webpubsub.WebPubSubId{}),

"event_handler": {
Type: pluginsdk.TypeSet,
Type: pluginsdk.TypeList,
Optional: true,
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
Expand Down Expand Up @@ -146,7 +146,7 @@ func resourceWebPubSubHubCreateUpdate(d *pluginsdk.ResourceData, meta interface{

parameters := webpubsub.WebPubSubHub{
Properties: webpubsub.WebPubSubHubProperties{
EventHandlers: expandEventHandler(d.Get("event_handler").(*pluginsdk.Set).List()),
EventHandlers: expandEventHandler(d.Get("event_handler").([]interface{})),
AnonymousConnectPolicy: &anonymousPolicyEnabled,
},
}
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/web_pubsub_hub.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ The following arguments are supported:

* `event_handler` - (Optional) An `event_handler` block as defined below.

-> **NOTE:** User can change the order of `event_handler` to change the priority accordingly.

---

An `event_handler` block supports the following:
Expand Down

0 comments on commit e30d429

Please sign in to comment.