Skip to content

Commit

Permalink
Documentation - adding datadog_integration_slack_channel slack impo…
Browse files Browse the repository at this point in the history
…rt example (#1128)

* Added a `terraform import` example for `datadog_integration_slack_channel`

* Refactored `datadog_integration_slack` Terraform example to match import example

* Removed some trailing whitespace

* Regenerated docs via `make docs`
  • Loading branch information
magnetikonline authored Jul 1, 2021
1 parent 65e1149 commit 4f91a05
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 10 deletions.
14 changes: 11 additions & 3 deletions docs/resources/integration_slack_channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ Resource for interacting with the Datadog Slack channel API
## Example Usage

```terraform
resource "datadog_integration_slack_channel" "slack_channel" {
resource "datadog_integration_slack_channel" "test_channel" {
account_name = "foo"
channel_name = "#test_channel"
display {
message = true
notified = false
snapshot = false
tags = true
}
channel_name = "#test_channel"
account_name = "foo"
}
```

Expand All @@ -48,4 +49,11 @@ Optional:
- **snapshot** (Boolean) Show the alert event's snapshot image.
- **tags** (Boolean) Show the scopes on which the monitor alerted.

## Import

Import is supported using the following syntax:

```shell
# Slack channel integrations can be imported using their account_name and channel_name separated with a colon (`:`).
terraform import datadog_integration_slack_channel.test_channel "foo:#test_channel"
```
1 change: 0 additions & 1 deletion examples/resources/datadog_downtime/import.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
terraform import datadog_downtime.bytes_received_localhost 2081

1 change: 0 additions & 1 deletion examples/resources/datadog_integration_aws/import.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Amazon Web Services integrations can be imported using their account ID and role name separated with a colon (:), while the external_id should be passed by setting an environment variable called EXTERNAL_ID
EXTERNAL_ID=${external_id} terraform import datadog_integration_aws.test ${account_id}:${role_name}

Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Amazon Web Services Lambda ARN integrations can be imported using their account_id and lambda_arn separated with a space (` `).
terraform import datadog_integration_aws_lambda_arn.test "1234567890 arn:aws:lambda:us-east-1:1234567890:function:datadog-forwarder-Forwarder"

Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Amazon Web Services log collection integrations can be imported using the `account ID`.
terraform import datadog_integration_aws_log_collection.test 1234567890

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Slack channel integrations can be imported using their account_name and channel_name separated with a colon (`:`).
terraform import datadog_integration_slack_channel.test_channel "foo:#test_channel"
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
resource "datadog_integration_slack_channel" "slack_channel" {
resource "datadog_integration_slack_channel" "test_channel" {
account_name = "foo"
channel_name = "#test_channel"

display {
message = true
notified = false
snapshot = false
tags = true
}
channel_name = "#test_channel"
account_name = "foo"
}

0 comments on commit 4f91a05

Please sign in to comment.