Skip to content

Commit 2a6f4c2

Browse files
authored
Add information about importing alert to the resource doc. (#175)
1 parent 3c0d6a6 commit 2a6f4c2

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

docs/resources/issue_alert.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,13 @@ resource "sentry_issue_alert" "main" {
145145
- `internal_id` (String) The internal ID for this issue alert.
146146
- `projects` (List of String, Deprecated) Use `project` (singular) instead.
147147

148+
## Import
148149

150+
Import is supported using the following syntax:
151+
152+
```shell
153+
# import using the organization, project slugs and rule id from the URL:
154+
# https://sentry.io/organizations/[org-slug]/projects/[project-slug]/
155+
# https://sentry.io/organizations/[org-slug]/alerts/rules/details/[rule-id]/
156+
terraform import sentry_issue_alert.default org-slug/project-slug/rule-id
157+
```

docs/resources/metric_alert.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,13 @@ Read-Only:
100100

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

103+
## Import
103104

105+
Import is supported using the following syntax:
106+
107+
```shell
108+
# import using the organization, project slugs and rule id from the URL:
109+
# https://sentry.io/organizations/[org-slug]/projects/[project-slug]/
110+
# https://sentry.io/organizations/[org-slug]/alerts/rules/details/[rule-id]/
111+
terraform import sentry_metric_alert.default org-slug/project-slug/rule-id
112+
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# import using the organization, project slugs and rule id from the URL:
2+
# https://sentry.io/organizations/[org-slug]/projects/[project-slug]/
3+
# https://sentry.io/organizations/[org-slug]/alerts/rules/details/[rule-id]/
4+
terraform import sentry_issue_alert.default org-slug/project-slug/rule-id
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# import using the organization, project slugs and rule id from the URL:
2+
# https://sentry.io/organizations/[org-slug]/projects/[project-slug]/
3+
# https://sentry.io/organizations/[org-slug]/alerts/rules/details/[rule-id]/
4+
terraform import sentry_metric_alert.default org-slug/project-slug/rule-id

0 commit comments

Comments
 (0)