Skip to content

Commit

Permalink
azurerm_web_pubsub_hub - set event_handler block to Optional (#…
Browse files Browse the repository at this point in the history
…17037)

* set event_handler block to optional

* remove event_handler block from basic test
  • Loading branch information
stephybun authored Jun 1, 2022
1 parent b4c549a commit ce0f4c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion 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 {

"event_handler": {
Type: pluginsdk.TypeSet,
Required: true,
Optional: true,
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
"url_template": {
Expand Down
6 changes: 0 additions & 6 deletions internal/services/signalr/web_pubsub_hub_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,6 @@ func (r WebPubsubHubResource) basic(data acceptance.TestData) string {
resource "azurerm_web_pubsub_hub" "test" {
name = "acctestwpsh%d"
web_pubsub_id = azurerm_web_pubsub.test.id
event_handler {
url_template = "https://test.com/api/{hub}/{event}"
user_event_pattern = "*"
system_events = ["connect", "connected"]
}
}
`, r.template(data), data.RandomInteger)
}
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/web_pubsub_hub.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ The following arguments are supported:

* `web_pubsub_id` - (Required) Specify the id of the Web Pubsub. Changing this forces a new resource to be created.

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

* `anonymous_connections_enabled` - (Optional) Is anonymous connections are allowed for this hub? Defaults to `false`.
Possible values are `true`, `false`.

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

---

An `event_handler` block supports the following:
Expand Down

0 comments on commit ce0f4c7

Please sign in to comment.