From 9cd60a9235015e858ea0f77a2cab71ea0f395d7c Mon Sep 17 00:00:00 2001 From: ks2 Date: Thu, 3 Aug 2023 17:00:54 +0530 Subject: [PATCH] Support for immediate notification --- opsgenie/resource_opsgenie_notification_rule.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opsgenie/resource_opsgenie_notification_rule.go b/opsgenie/resource_opsgenie_notification_rule.go index 3824dc10..c3d5cbd8 100644 --- a/opsgenie/resource_opsgenie_notification_rule.go +++ b/opsgenie/resource_opsgenie_notification_rule.go @@ -73,6 +73,7 @@ func resourceOpsGenieNotificationRule() *schema.Resource { "send_after": { Type: schema.TypeInt, Optional: true, + Default: 0, }, "contact": { Type: schema.TypeList, @@ -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)),