|
| 1 | +--- |
| 2 | +layout: 'sumologic' |
| 3 | +page_title: 'SumoLogic: sumologic_connection' |
| 4 | +description: |- |
| 5 | + Provides the ability to create, read, delete, update connections. |
| 6 | +--- |
| 7 | + |
| 8 | +# sumologic_connection |
| 9 | + |
| 10 | +Provides the ability to create, read, delete, update connections. |
| 11 | + |
| 12 | +## Example Usage |
| 13 | + |
| 14 | +```hcl |
| 15 | +resource "sumologic_connection" "connection" { |
| 16 | + type = "WebhookConnection" |
| 17 | + name = "test-connection |
| 18 | + description = "My description" |
| 19 | + url = "https://connection-endpoint.com" |
| 20 | + headers = { |
| 21 | + "X-Header" : "my-header" |
| 22 | + } |
| 23 | + custom_headers = { |
| 24 | + "X-custom" : "my-custom-header" |
| 25 | + } |
| 26 | + default_payload = <<JSON |
| 27 | +{ |
| 28 | + "client" : "Sumo Logic", |
| 29 | + "eventType" : "{{SearchName}}", |
| 30 | + "description" : "{{SearchDescription}}", |
| 31 | + "search_url" : "{{SearchQueryUrl}}", |
| 32 | + "num_records" : "{{NumRawResults}}", |
| 33 | + "search_results" : "{{AggregateResultsJson}}" |
| 34 | +} |
| 35 | +JSON |
| 36 | + webhook_type = "Webhook" |
| 37 | +} |
| 38 | +``` |
| 39 | + |
| 40 | +## Argument reference |
| 41 | + |
| 42 | +The following arguments are supported: |
| 43 | + |
| 44 | +- `type` - (Required) Type of connection. Only `WebhookDefinition` is implimented right now. |
| 45 | +- `name` - (Required) Name of connection. Name should be a valid alphanumeric value. |
| 46 | +- `description` - (Optional) Description of the connection. |
| 47 | +- `url` - (Required) URL for the webhook connection. |
| 48 | +- `headers` - (Optional) Map of access authorization headers. |
| 49 | +- `custom_headers` - (Optional) Map of custom webhook headers |
| 50 | +- `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`, and `NewRelic`. Default: `Webhook` |
| 52 | + |
| 53 | +Additional data provided in state |
| 54 | + |
| 55 | +- `id` - (Computed) The Id for this connection. |
| 56 | + |
| 57 | +## Import |
| 58 | + |
| 59 | +Connections can be imported using the connection id, e.g.: |
| 60 | + |
| 61 | +```hcl |
| 62 | +terraform import sumologic_connection.test 1234567890 |
| 63 | +``` |
| 64 | + |
| 65 | +[Back to Index][0] |
| 66 | + |
| 67 | +[0]: ../README.md |
0 commit comments