opsgenie / terraform-provider-opsgenie

Terraform OpsGenie provider
https://registry.terraform.io/providers/opsgenie/opsgenie/latest/docs
Mozilla Public License 2.0
104 stars 137 forks source link

Schedule timezone mismatch after apply #258

Open n3bulous opened 3 years ago

n3bulous commented 3 years ago

Hello!

We have a global support team and I'm trying to implement a single schedule using UTC as the timezone. When setting UTC the website would show Africa/Monrovia. Subsequent plans would always report a diff.

Terraform Version

Terraform v1.0.5
on darwin_amd64
+ provider registry.terraform.io/opsgenie/opsgenie v0.6.5

Affected Resource(s)

Terraform Configuration Files

resource "opsgenie_schedule" "schedule" {
  name = "Everything On Call Schedule"
  timezone = "UTC"
  enabled = true
  owner_team_id = "${opsgenie_team.team.id}"
}

Timezones tried: UTC, Etc/UTC, Zulu, GMT

Expected Behavior

The website would show:

Screen Shot 2021-08-21 at 10 01 18

Actual Behavior

Terraform detected the following changes made outside of Terraform since the
last "terraform apply":

  # opsgenie_schedule.leverage_schedule has been changed
  ~ resource "opsgenie_schedule" "schedule" {
        id            = "8c966307-fd3c-4313-a0c7-4626b159300a"
        name          = "Everything On Call Schedule"
      ~ timezone      = "UTC" -> "Africa/Monrovia"
        # (3 unchanged attributes hidden)
    }

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Create a schedule with timezone = UTC, Zulu, Etc/UTC
  2. terraform apply
  3. terraform plan should show the problem.

Important Factoids

You can work around the problem by manually setting the schedule's timezone to UTC on the website and running terraform apply -refresh-only.

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

ffahri commented 3 years ago

245

We introduced this check with the above PR. We might need to enhance this flow.