Skip to content

Commit 9a04f30

Browse files
committed
SUMO-170407: initial support for new ServiceNow connection
1 parent ce5df0c commit 9a04f30

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

sumologic/resource_sumologic_connection.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ func resourceToConnection(d *schema.ResourceData) Connection {
200200
connection.Headers = mapToHeaders(d.Get("headers").(map[string]interface{}))
201201
connection.CustomHeaders = mapToHeaders(d.Get("custom_headers").(map[string]interface{}))
202202
connection.DefaultPayload = d.Get("default_payload").(string)
203+
connection.ConnectionSubtype = d.Get("connection_subtype").(string)
203204
connection.WebhookType = d.Get("webhook_type").(string)
204205

205206
return connection

sumologic/sumologic_client.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -351,15 +351,16 @@ type Content struct {
351351

352352
// Connection is used to describe a connection.
353353
type Connection struct {
354-
ID string `json:"id,omitempty"`
355-
Type string `json:"type"`
356-
Name string `json:"name"`
357-
Description string `json:"description,omitempty"`
358-
URL string `json:"url"`
359-
Headers []Headers `json:"headers,omitempty"`
360-
CustomHeaders []Headers `json:"customHeaders,omitempty"`
361-
DefaultPayload string `json:"defaultPayload"`
362-
WebhookType string `json:"webhookType"`
354+
ID string `json:"id,omitempty"`
355+
Type string `json:"type"`
356+
Name string `json:"name"`
357+
Description string `json:"description,omitempty"`
358+
URL string `json:"url"`
359+
Headers []Headers `json:"headers,omitempty"`
360+
CustomHeaders []Headers `json:"customHeaders,omitempty"`
361+
DefaultPayload string `json:"defaultPayload"`
362+
WebhookType string `json:"webhookType"`
363+
ConnectionSubtype string `json:"connectionSubtype"`
363364
}
364365

365366
// Headers is used to describe headers for http requests.

website/docs/r/connection.html.markdown

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ The following arguments are supported:
4848
- `headers` - (Optional) Map of access authorization headers.
4949
- `custom_headers` - (Optional) Map of custom webhook headers
5050
- `default_payload` - (Required) Default payload of the webhook.
51-
- `webhook_type` - (Optional) Type of webhook. Valid values are `AWSLambda`, `Azure`, `Datadog`, `HipChat`, `PagerDuty`, `Slack`, `Webhook`, `NewRelic`, and `MicrosoftTeams`. Default: `Webhook`
51+
- `connection_subtype` - (Optional) The subtype of the connection. Valid values are `Incident` and `Event`. NOTEL This is only used for the `ServiceNow` webhook type.
52+
- `webhook_type` - (Optional) Type of webhook. Valid values are `AWSLambda`, `Azure`, `Datadog`, `HipChat`, `PagerDuty`, `Slack`, `Webhook`, `NewRelic`, `MicrosoftTeams`, and `ServiceNow`. Default: `Webhook`
5253

5354
Additional data provided in state
5455

0 commit comments

Comments
 (0)