Skip to content

Commit

Permalink
[docs] Add Terraform example for opensearch_channel_configuation (#154)
Browse files Browse the repository at this point in the history
* [docs] Add Terraform example for opensearch_channel_configuation

Signed-off-by: Vonter <[email protected]>

* [docs] Change webhook URL in example Terraform

Signed-off-by: Vonter <[email protected]>

---------

Signed-off-by: Vonter <[email protected]>
  • Loading branch information
Vonter authored Feb 6, 2024
1 parent 14a019f commit 734961a
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
30 changes: 29 additions & 1 deletion docs/resources/channel_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,27 @@ description: |-

Provides an OpenSearch channel configuration. Please refer to the OpenSearch channel configuration documentation for details.


## Example Usage

```terraform
# Create a channel configuration
resource "opensearch_channel_configuration" "configuration_1" {
body = <<EOF
{
"config_id": "configuration_1",
"config": {
"name": "name",
"description" : "description",
"config_type" : "slack",
"is_enabled" : true,
"slack": {
"url": "https://sample-slack-webhook"
}
}
}
EOF
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand All @@ -22,3 +42,11 @@ Provides an OpenSearch channel configuration. Please refer to the OpenSearch cha
### Read-Only

- `id` (String) The ID of this resource.

## Import

Import is supported using the following syntax:

```shell
terraform import opensearch_channel_configuration.configuration_1 configuration_1
```
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import opensearch_channel_configuration.configuration_1 configuration_1
17 changes: 17 additions & 0 deletions examples/resources/opensearch_channel_configuration/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Create a channel configuration
resource "opensearch_channel_configuration" "configuration_1" {
body = <<EOF
{
"config_id": "configuration_1",
"config": {
"name": "name",
"description" : "description",
"config_type" : "slack",
"is_enabled" : true,
"slack": {
"url": "https://sample-slack-webhook"
}
}
}
EOF
}

0 comments on commit 734961a

Please sign in to comment.