Skip to content

Commit

Permalink
Support for immediate notification
Browse files Browse the repository at this point in the history
  • Loading branch information
koushik-swaminathan committed Oct 18, 2023
1 parent b640450 commit 9cd60a9
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 9cd60a9

Please sign in to comment.