oracle / terraform-provider-oci

Terraform Oracle Cloud Infrastructure provider
https://www.terraform.io/docs/providers/oci/
Mozilla Public License 2.0
760 stars 684 forks source link

oci_monitoring_alarm cannot unset repeat_notification_duration once set #2002

Open jeliker opened 1 year ago

jeliker commented 1 year ago

Community Note

Terraform Version and Provider Version

Terraform v1.5.3 on darwin_amd64

Affected Resource(s)

affected_resources=oci_monitoring_alarm

Terraform Configuration Files

resource "oci_monitoring_alarm" "the_alarm" {
  #Required
  compartment_id = var.compartment_id
  destinations = [var.topic_id]
  display_name = var.alarm_display_name
  is_enabled = var.alarm_is_enabled
  metric_compartment_id = var.metric_compartment_id
  namespace = var.namespace
  query = var.query
  severity = var.severity

  #Optional
  repeat_notification_duration = "PT15M"
}

Debug Output

Panic Output

Expected Behavior

Setting repeat_notification_duration to null should remove the repeat duration value.

Actual Behavior

Setting repeat_notification_duration to null for an alarm that had a previous non-null value does not remove the repeat duration value.

Steps to Reproduce

  1. terraform apply with above HCL
  2. After alarm is created, change to repeat_notification_duration = null then terraform apply
  3. Apply is successful but does not remove the repeat_notification_duration value

Important Factoids

References

tf-oci-pub commented 12 months ago

Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.