Skip to content

Commit

Permalink
[docs] Add Terraform example for opensearch_channel_configuation
Browse files Browse the repository at this point in the history
Signed-off-by: Vonter <[email protected]>
  • Loading branch information
Vonter committed Feb 1, 2024
1 parent 1c27b66 commit 4e77b64
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://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
}
}
}
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://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
}
}
}
EOF
}

0 comments on commit 4e77b64

Please sign in to comment.