DataDog / terraform-provider-datadog

Terraform Datadog provider
https://www.terraform.io/docs/providers/datadog/
Mozilla Public License 2.0
399 stars 375 forks source link

Inconsistent `start` times for `datadog_downtime_schedule` resource after apply #2535

Open sagematic opened 1 month ago

sagematic commented 1 month ago

Datadog Terraform Provider Version

v3.43.1

Terraform Version

v1.8.5

What resources or data sources are affected?

datadog_downtime_schedule

Terraform Configuration Files

resource "datadog_downtime_schedule" "downtime_schedule" {
  scope = "environment:production OR environment:staging"
  monitor_identifier {
    monitor_tags = ["service:generic_service", "downtime:generic_downtime"]
  }
  recurring_schedule {
    recurrence { 
      duration = "28h"
      rrule    = "FREQ=WEEKLY;INTERVAL=1;BYDAY=SU"
      start    = "2024-08-25T17:00:00"
    }
    recurrence { 
      duration = "28h"
      rrule    = "FREQ=WEEKLY;INTERVAL=1;BYDAY=FR"
      start    = "2024-08-23T02:00:00"
    }
    recurrence { 
      duration = "19h"
      rrule    = "FREQ=WEEKLY;INTERVAL=1;BYDAY=TU,WE,TH"
      start    = "2024-08-21T02:00:00"
    }
    timezone = "America/New_York"
  }
  display_timezone                 = "America/New_York"
  message                          = "Scheduled downtime for maintenance."
  mute_first_recovery_notification = true
  notify_end_states                = ["alert", "warn"]
  notify_end_types                 = ["canceled", "expired"]
}

Relevant debug or panic output

��� Error: Provider produced inconsistent result after apply ��� ��� When applying changes to datadog_downtime_schedule.downtime_schedule, ��� provider "provider[\"registry.terraform.io/datadog/datadog\"]" produced an ��� unexpected new value: .recurring_schedule.recurrence[0].start: was ��� cty.StringVal("2024-08-25T17:00:00"), but now ��� cty.StringVal("2024-08-25T13:00:00"). ��� ��� This is a bug in the provider, which should be reported in the provider's ��� own issue tracker. ��� ��� ��� Error: Provider produced inconsistent result after apply ��� ��� When applying changes to datadog_downtime_schedule.downtime_schedule, ��� provider "provider[\"registry.terraform.io/datadog/datadog\"]" produced an ��� unexpected new value: .recurring_schedule.recurrence[1].start: was ��� cty.StringVal("2024-08-23T02:00:00"), but now ��� cty.StringVal("2024-08-22T22:00:00"). ��� ��� This is a bug in the provider, which should be reported in the provider's ��� own issue tracker. ��� ��� ��� Error: Provider produced inconsistent result after apply ��� ��� When applying changes to datadog_downtime_schedule.downtime_schedule, ��� provider "provider[\"registry.terraform.io/datadog/datadog\"]" produced an ��� unexpected new value: .recurring_schedule.recurrence[2].start: was ��� cty.StringVal("2024-08-21T02:00:00"), but now ��� cty.StringVal("2024-08-20T22:00:00"). ��� ��� This is a bug in the provider, which should be reported in the provider's ��� own issue tracker.

Expected Behavior

The datadog_downtime_schedule resource should maintain the start times as configured, such as "2024-08-25T17:00:00", without alteration after applying.

Actual Behavior

After applying, the start times for the datadog_downtime_schedule resource are unexpectedly altered, showing discrepancies such as changing from "2024-08-25T17:00:00" to "2024-08-25T13:00:00", indicating a possible bug in handling time data.

Steps to Reproduce

terraform apply

Important Factoids

No response

References

No response