Skip to content

Commit

Permalink
feat(alert-muting-rule): add validation on action_on_muting_rule_wind…
Browse files Browse the repository at this point in the history
…ow_ended
  • Loading branch information
Aashirwadjain committed Dec 19, 2024
1 parent f7a1410 commit 470f47a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion newrelic/structures_newrelic_alert_muting_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,11 @@ func flattenMutingRule(mutingRule *alerts.MutingRule, d *schema.ResourceData) er
configuredCondition := x.([]interface{})

_ = d.Set("enabled", mutingRule.Enabled)
_ = d.Set("action_on_muting_rule_window_ended", mutingRule.ActionOnMutingRuleWindowEnded)

if _, ok := d.GetOk("action_on_muting_rule_window_ended"); ok {
_ = d.Set("action_on_muting_rule_window_ended", mutingRule.ActionOnMutingRuleWindowEnded)
}

err := d.Set("condition", flattenMutingRuleConditionGroup(mutingRule.Condition, configuredCondition))
if err != nil {
return nil
Expand Down

0 comments on commit 470f47a

Please sign in to comment.