diff --git a/go.mod b/go.mod index 73365c6d7..55ddb6482 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/mitchellh/go-homedir v1.1.0 github.com/newrelic/go-agent/v3 v3.30.0 github.com/newrelic/go-insights v1.0.3 - github.com/newrelic/newrelic-client-go/v2 v2.52.0 + github.com/newrelic/newrelic-client-go/v2 v2.53.0 github.com/stretchr/testify v1.9.0 golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 ) diff --git a/go.sum b/go.sum index 7b7315f66..37147faa5 100644 --- a/go.sum +++ b/go.sum @@ -270,8 +270,8 @@ github.com/newrelic/go-agent/v3 v3.30.0 h1:ZXHCT/Cot4iIPwcegCZURuRQOsfmGA6wilW+S github.com/newrelic/go-agent/v3 v3.30.0/go.mod h1:9utrgxlSryNqRrTvII2XBL+0lpofXbqXApvVWPpbzUg= github.com/newrelic/go-insights v1.0.3 h1:zSNp1CEZnXktzSIEsbHJk8v6ZihdPFP2WsO/fzau3OQ= github.com/newrelic/go-insights v1.0.3/go.mod h1:A20BoT8TNkqPGX2nS/Z2fYmKl3Cqa3iKZd4whzedCY4= -github.com/newrelic/newrelic-client-go/v2 v2.52.0 h1:aY8502kV0IlIeOu1c9B/kLWN1je4NEwFFJ/FN2hMoyQ= -github.com/newrelic/newrelic-client-go/v2 v2.52.0/go.mod h1:+RRjI3nDGWT3kLm9Oi3QxpBm70uu8q1upEHBVWCZFpo= +github.com/newrelic/newrelic-client-go/v2 v2.53.0 h1:Quv3stsXcn56vE5p4KAFL8N2gO11B1l5/+kbdp74fZ4= +github.com/newrelic/newrelic-client-go/v2 v2.53.0/go.mod h1:+RRjI3nDGWT3kLm9Oi3QxpBm70uu8q1upEHBVWCZFpo= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= diff --git a/newrelic/resource_newrelic_workflow_test.go b/newrelic/resource_newrelic_workflow_test.go index d4b750a54..3dbd5cb9b 100644 --- a/newrelic/resource_newrelic_workflow_test.go +++ b/newrelic/resource_newrelic_workflow_test.go @@ -14,6 +14,33 @@ import ( "github.com/newrelic/newrelic-client-go/v2/pkg/ai" ) +func TestNewRelicWorkflow_WithInvestigatingNotificationTriggers(t *testing.T) { + resourceName := "newrelic_workflow.foo" + rName := generateNameForIntegrationTestResource() + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheckEnvVars(t) }, + Providers: testAccProviders, + CheckDestroy: testAccNewRelicWorkflowDestroy, + Steps: []resource.TestStep{ + // Test: Create workflow + { + Config: testAccNewRelicWorkflowConfigurationWithNotificationTriggers(testAccountID, rName, `["ACTIVATED", "INVESTIGATING"]`), + Check: resource.ComposeTestCheckFunc( + testAccCheckNewRelicWorkflowExists(resourceName), + ), + }, + // Test: Update workflow + { + Config: testAccNewRelicWorkflowConfigurationWithNotificationTriggers(testAccountID, fmt.Sprintf("%s-updated", rName), `["ACTIVATED", "INVESTIGATING", "CLOSED"]`), + Check: resource.ComposeTestCheckFunc( + testAccCheckNewRelicWorkflowExists(resourceName), + ), + }, + }, + }) +} + func TestNewRelicWorkflow_Webhook(t *testing.T) { resourceName := "newrelic_workflow.foo" rName := generateNameForIntegrationTestResource() diff --git a/website/docs/r/workflow.html.markdown b/website/docs/r/workflow.html.markdown index f7d5082a4..9aadcb686 100644 --- a/website/docs/r/workflow.html.markdown +++ b/website/docs/r/workflow.html.markdown @@ -180,6 +180,7 @@ One could, for example, configure a workflow to open a Jira ticket and send Slac Possible values: * `ACTIVATED` - Send a notification when an issue is activated * `ACKNOWLEDGED` - Send a notification when an issue is acknowledged +* `INVESTIGATING` - Send a notification when an issue is being investigated * `PRIORITY_CHANGED` - Send a notification when an issue's priority has been changed * `CLOSED` - Send a notification when an issue is closed * `OTHER_UPDATES` - Send a notification on other updates on the issue. These updates include: