Skip to content

Commit 51dd019

Browse files
committed
- Add docs.
- Update version.
1 parent 02f31b8 commit 51dd019

File tree

5 files changed

+64
-2
lines changed

5 files changed

+64
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.5.0 (November 7, 2024)
2+
ENHANCEMENTS
3+
* Adds support for alert endpoints
4+
15
## 2.4.5 (October 17, 2024)
26
BUGFIX
37
* `ns1-go` client version bump to allow wiping out record regions

examples/alert.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ resource "ns1_alert" "email_on_zone_transfer_failure" {
66
zone_names = [ns1_zone.alert_example_one.zone, ns1_zone.alert_example_two.zone]
77
}
88

9-
# Nofitication list
9+
# Notification list
1010
resource "ns1_notifylist" "email_list" {
1111
name = "email list"
1212
notifications {

ns1/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
)
2020

2121
var (
22-
clientVersion = "2.4.5"
22+
clientVersion = "2.5.0"
2323
providerUserAgent = "tf-ns1" + "/" + clientVersion
2424
defaultRetryMax = 3
2525
)

website/docs/r/alert.html.markdown

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
layout: "ns1"
3+
page_title: "NS1: ns1_alert"
4+
sidebar_current: "docs-ns1-resource-alert"
5+
description: |-
6+
Provides a NS1 Alert resource.
7+
---
8+
9+
# ns1\_alert
10+
11+
Provides a NS1 Alert resource. This can be used to create, modify, and delete alerts.
12+
13+
## Example Usage
14+
15+
```hcl
16+
resource "ns1_alert" "example" {
17+
#required
18+
name = "Example Alert"
19+
type = "zone"
20+
subtype = "transfer_failed"
21+
22+
#optional
23+
notification_lists = []
24+
zone_names = []
25+
record_ids = []
26+
}
27+
```
28+
29+
## Argument Reference
30+
31+
The following arguments are supported:
32+
33+
* `name` - (Required) The free-form display name for the alert.
34+
* `type` - (Required) The type of the alert.
35+
* `subtype` - (Required) The type of the alert.
36+
* `notification_lists` - (Optional) A list of id's for notification lists whose notifiers will be triggered by the alert.
37+
* `zone_names` - (Optional) A list of zones this alert applies to.
38+
* `record_ids` - (Optional) A list of record id's this alert applies to.
39+
40+
## Attributes Reference
41+
42+
In addition to all arguments above, the following attributes are exported:
43+
44+
* `created_by` - (Read Only) The user or apikey that created this alert.
45+
* `updated_by` - (Read Only) The user or apikey that last modified this alert.
46+
* `created_at` - (Read Only) The Unix timestamp representing when the alert configuration was created.
47+
* `updated_at` - (Read Only) The Unix timestamp representing when the alert configuration was last modified.
48+
49+
## Import
50+
51+
`terraform import ns1_alert.<name> <alert_id>`
52+
53+
## NS1 Documentation
54+
55+
[Alerts Api Doc](https://ns1.com/api#alerts)

website/ns1.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161
<li<%= sidebar_current("docs-ns1-resource-redirect") %>>
6262
<a href="/docs/providers/ns1/r/redirect.html">ns1_user</a>
6363
</li>
64+
<li<%= sidebar_current("docs-ns1-resource-alert") %>>
65+
<a href="/docs/providers/ns1/r/alert.html">ns1_alert</a>
66+
</li>
6467
</ul>
6568
</li>
6669
</ul>

0 commit comments

Comments
 (0)