Skip to content

Commit de6e476

Browse files
committed
feat(alerts): use go-client PR commit to see if tests pass
1 parent 7e181eb commit de6e476

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ module github.com/newrelic/terraform-provider-newrelic/v2
22

33
go 1.23.6
44

5+
replace github.com/newrelic/newrelic-client-go/v2 => github.com/newrelic/newrelic-client-go/v2 v2.62.1-0.20250613191201-02f8af57f3d5
6+
57
require (
68
github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1
79
github.com/mitchellh/go-homedir v1.1.0
810
github.com/newrelic/go-agent/v3 v3.30.0
911
github.com/newrelic/go-insights v1.0.3
10-
github.com/newrelic/newrelic-client-go/v2 v2.61.2
12+
github.com/newrelic/newrelic-client-go/v2 v2.62.1-0.20250613191201-02f8af57f3d5
1113
github.com/stretchr/testify v1.9.0
1214
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8
1315
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ github.com/newrelic/go-agent/v3 v3.30.0 h1:ZXHCT/Cot4iIPwcegCZURuRQOsfmGA6wilW+S
270270
github.com/newrelic/go-agent/v3 v3.30.0/go.mod h1:9utrgxlSryNqRrTvII2XBL+0lpofXbqXApvVWPpbzUg=
271271
github.com/newrelic/go-insights v1.0.3 h1:zSNp1CEZnXktzSIEsbHJk8v6ZihdPFP2WsO/fzau3OQ=
272272
github.com/newrelic/go-insights v1.0.3/go.mod h1:A20BoT8TNkqPGX2nS/Z2fYmKl3Cqa3iKZd4whzedCY4=
273-
github.com/newrelic/newrelic-client-go/v2 v2.61.2 h1:gjWHv9TvnjDwHUKT/6RA8kWOfS4T31t+3iLNBYJ0YpA=
274-
github.com/newrelic/newrelic-client-go/v2 v2.61.2/go.mod h1:GG7CtbtIZIF6bPBLkBU1uB+tP8gSu9B8iRFTtzWoT+k=
273+
github.com/newrelic/newrelic-client-go/v2 v2.62.1-0.20250613191201-02f8af57f3d5 h1:IhJLDCpTwljOSWKVVi6urLlXg+LfVGGxF0Ljh248cok=
274+
github.com/newrelic/newrelic-client-go/v2 v2.62.1-0.20250613191201-02f8af57f3d5/go.mod h1:GG7CtbtIZIF6bPBLkBU1uB+tP8gSu9B8iRFTtzWoT+k=
275275
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
276276
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
277277
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=

newrelic/resource_newrelic_nrql_alert_condition_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,13 +1584,11 @@ resource "newrelic_nrql_alert_condition" "foo" {
15841584
policy_id = newrelic_alert_policy.foo.id
15851585
15861586
name = "tf-test-%[1]s"
1587-
type = "baseline"
1587+
type = "static"
15881588
enabled = false
15891589
violation_time_limit_seconds = 3600
15901590
aggregation_delay = 2
15911591
aggregation_window = 3600
1592-
aggregation_method = "event_flow"
1593-
evaluation_delay = 60
15941592
polling_frequency = 3600
15951593
15961594
nrql {
@@ -1605,4 +1603,4 @@ resource "newrelic_nrql_alert_condition" "foo" {
16051603
}
16061604
}
16071605
`, name)
1608-
}
1606+
}

newrelic/structures_newrelic_nrql_alert_condition_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ func TestExpandNrqlAlertConditionInput(t *testing.T) {
428428
},
429429
"polling frequency not nil": {
430430
Data: map[string]interface{}{
431-
"nrql": []interface{}{nrql},
431+
"nrql": []interface{}{nrql},
432432
"polling_frequency": 3600,
433433
},
434434
Expanded: &alerts.NrqlConditionCreateInput{
@@ -441,7 +441,7 @@ func TestExpandNrqlAlertConditionInput(t *testing.T) {
441441
},
442442
"polling frequency nil": {
443443
Data: map[string]interface{}{
444-
"nrql": []interface{}{nrql},
444+
"nrql": []interface{}{nrql},
445445
"polling_frequency": nil,
446446
},
447447
Expanded: &alerts.NrqlConditionCreateInput{

website/docs/r/nrql_alert_condition.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ The following arguments are supported:
102102
- `evaluation_delay` - (Optional) How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
103103
- `slide_by` - (Optional) Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The `slide_by` value is specified in seconds and must be smaller than and a factor of the `aggregation_window`.
104104
- `signal_seasonality` - (Optional) Seasonality under which a condition's signal(s) are evaluated. Only available for baseline conditions. Valid values are: `NEW_RELIC_CALCULATION`, `HOURLY`, `DAILY`, `WEEKLY`, or `NONE`. To have New Relic calculate seasonality automatically, set to `NEW_RELIC_CALCULATION`. To turn off seasonality completely, set to `NONE`.
105-
- `polling_frequency` - (Optional) The frequency at which the NRQL will be executed and the results will be evaluated, in seconds. Polling cannot happen more frequently than 3600 seconds (1 hour), and must be specified in whole hour increments. Only valid for NRQL conditions with CloudCost, KubernetesCost, or CloudCostEstimate event types. Conditions for these event types are evaluated in a polling fashion.
105+
- `polling_frequency` - (Optional) The frequency at which the NRQL will be executed and the results will be evaluated, in seconds. Polling cannot happen more frequently than 3600 seconds (1 hour), and must be specified in whole hour increments. Example: Frequency may be 3600 seconds (1 hour), but not 5400 seconds (1.5 hours). Polling cannot happen less frequently than the duration of the warning term, critical term, or 24 hours, whichever is shortest. Example: If the warning term duration is 2 days and the critical term duration is 3 days, the polling must be no less frequent than once every 86400 seconds (24 hours). Example: If the warning term duration is 6 hours and the critical term duration is 12 hours, the polling must be no less frequent than once every 21600 seconds (6 hours). Default polling frequency will be 3600 seconds (1 hour). Only valid for NRQL conditions with CloudCost, KubernetesCost, or CloudCostEstimate event types. Conditions for these event types are evaluated in a polling fashion.
106106

107107
## NRQL
108108

0 commit comments

Comments
 (0)