Skip to content
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

Support for immediate notification #396

Merged
merged 2 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all 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 go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.18
require (
github.com/hashicorp/go-retryablehttp v0.6.6
github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.0
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.21
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.22
github.com/pkg/errors v0.9.1
)

Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,8 @@ github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce h1:RPclfga2SEJmgMmz2k
github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce/go.mod h1:uFMI8w+ref4v2r9jz+c9i1IfIttS/OkmLfrk1jne5hs=
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.20 h1:twA4Kiaw+Vi4x5Ei3qDO1TtQf7oSuJQ+CqJB9j9lEmQ=
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.20/go.mod h1:4OjcxgwdXzezqytxN534MooNmrxRD50geWZxTD7845s=
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.21 h1:LaUWNfxQJdJL5wGPolEhZaKzfFYKBkDABPRl2FsFpe0=
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.21/go.mod h1:4OjcxgwdXzezqytxN534MooNmrxRD50geWZxTD7845s=
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.22 h1:0h+YoXSyipf6XQGyIaDg6z5jwRik1JSm+sQetnD7vGY=
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.22/go.mod h1:4OjcxgwdXzezqytxN534MooNmrxRD50geWZxTD7845s=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down
3 changes: 2 additions & 1 deletion opsgenie/resource_opsgenie_notification_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func resourceOpsGenieNotificationRule() *schema.Resource {
"send_after": {
Type: schema.TypeInt,
Optional: true,
Default: 0,
},
"contact": {
Type: schema.TypeList,
Expand Down Expand Up @@ -440,7 +441,7 @@ func expandOpsGenieNotificationRuleSteps(input []interface{}) []*og.Step {
element := og.Step{}
element.Enabled = &enabled
element.Contact = expandOpsGenieNotificationRuleStepsContact(config["contact"].([]interface{}))
if config["send_after"].(int) > 0 {
if config["send_after"].(int) >= 0 {
element.SendAfter = &og.SendAfter{
TimeUnit: "minute",
TimeAmount: uint32(config["send_after"].(int)),
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ github.com/mitchellh/reflectwalk
# github.com/oklog/run v1.0.0
## explicit
github.com/oklog/run
# github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.21
# github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.22
## explicit; go 1.12
github.com/opsgenie/opsgenie-go-sdk-v2/alert
github.com/opsgenie/opsgenie-go-sdk-v2/client
Expand Down
Loading