Skip to content

Modifies since_value's validation to match rest API's requirements #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 10, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -52,7 +52,7 @@ func resourceNewRelicNrqlAlertCondition() *schema.Resource {
"since_value": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{"1", "2", "3", "4", "5"}, false),
ValidateFunc: validation.IntBetween(1, 20),
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion newrelic/resource_newrelic_nrql_alert_condition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestAccNewRelicNrqlAlertCondition_Basic(t *testing.T) {
resource.TestCheckResourceAttr(
"newrelic_nrql_alert_condition.foo", "nrql.0.query", "SELECT uniqueCount(hostname) FROM ComputeSample"),
resource.TestCheckResourceAttr(
"newrelic_nrql_alert_condition.foo", "nrql.0.since_value", "5"),
"newrelic_nrql_alert_condition.foo", "nrql.0.since_value", "20"),
),
},
{
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/nrql_alert_condition.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The `term` mapping supports the following arguments:
The `nrql` attribute supports the following arguments:

* `query` - (Required) The NRQL query to execute for the condition.
* `since_value` - (Required) The value to be used in the `SINCE <X> MINUTES AGO` clause for the NRQL query. Must be: `1`, `2`, `3`, `4`, or `5`.
* `since_value` - (Required) The value to be used in the `SINCE <X> MINUTES AGO` clause for the NRQL query. Must be an integer between `1` and `20`.

## Attributes Reference

Expand Down