Skip to content

Commit

Permalink
Merge pull request #178 from jamesgoodhouse/fix_nrql_alert_duration
Browse files Browse the repository at this point in the history
fix nrql alert condition duration
  • Loading branch information
ctrombley authored Oct 19, 2019
2 parents 118e724 + 6348781 commit e0b5591
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion newrelic/resource_newrelic_nrql_alert_condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func resourceNewRelicNrqlAlertCondition() *schema.Resource {
"duration": {
Type: schema.TypeInt,
Required: true,
ValidateFunc: intInSlice([]int{1, 2, 3, 4, 5, 10, 15, 30, 60, 120}),
ValidateFunc: validation.IntBetween(1, 120),
},
"operator": {
Type: schema.TypeString,
Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/nrql_alert_condition.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The following arguments are supported:

The `term` mapping supports the following arguments:

* `duration` - (Required) In minutes, must be: `1`, `2`, `3`, `4`, `5`, `10`, `15`, `30`, `60`, or `120`.
* `duration` - (Required) In minutes, must be in the range of `1` to `120`, inclusive.
* `operator` - (Optional) `above`, `below`, or `equal`. Defaults to `equal`.
* `priority` - (Optional) `critical` or `warning`. Defaults to `critical`.
* `threshold` - (Required) Must be 0 or greater.
Expand All @@ -76,8 +76,8 @@ The following attributes are exported:

## Import

Alert conditions can be imported using the `id`, e.g.
Alert conditions can be imported using a composite ID of `<policy_id>:<condition_id> `id`, e.g.

```
$ terraform import newrelic_nrql_alert_condition.main 12345
$ terraform import newrelic_nrql_alert_condition.main 12345:67890
```

0 comments on commit e0b5591

Please sign in to comment.