Skip to content

Commit

Permalink
feat(alerts): Add incident title template support (#2662)
Browse files Browse the repository at this point in the history
  • Loading branch information
baNROne authored Aug 12, 2024
1 parent af21a81 commit c519256
Show file tree
Hide file tree
Showing 7 changed files with 275 additions and 120 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,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.42.1
github.com/newrelic/newrelic-client-go/v2 v2.43.0
github.com/stretchr/testify v1.9.0
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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.42.1 h1:IztJJ2coZaU87y1MZfKueGO/setV/zIYC5Yamg7Mxi0=
github.com/newrelic/newrelic-client-go/v2 v2.42.1/go.mod h1:pDFY24/6iIMEbPIdowTRrRn9YYwkXc3j+B+XpTb4oF4=
github.com/newrelic/newrelic-client-go/v2 v2.43.0 h1:w0at7osH5aY48qNEagjSFOBP1WvRLQv9F6BNDwCscog=
github.com/newrelic/newrelic-client-go/v2 v2.43.0/go.mod h1:pDFY24/6iIMEbPIdowTRrRn9YYwkXc3j+B+XpTb4oF4=
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=
Expand Down
5 changes: 5 additions & 0 deletions newrelic/resource_newrelic_nrql_alert_condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ func resourceNewRelicNrqlAlertCondition() *schema.Resource {
Optional: true,
Description: "The description of the NRQL alert condition.",
},
"title_template": {
Type: schema.TypeString,
Optional: true,
Description: "This field allows you to create a custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be Handlebars format.",
},
"violation_time_limit": {
Type: schema.TypeString,
Deprecated: "use `violation_time_limit_seconds` attribute instead",
Expand Down
Loading

0 comments on commit c519256

Please sign in to comment.