Skip to content

opsgenie_schedule timezone not setting on first apply when using Europe/London timezone #460

@rslotte

Description

@rslotte

Terraform Version

terraform -v
Terraform v1.9.8
on darwin_arm64
+ provider registry.terraform.io/opsgenie/opsgenie v0.6.37

Affected Resource(s)

  • opsgenie_schedule

Terraform Configuration Files

resource "opsgenie_schedule" "london" {
  name        = "genieschedule2"
  description = "schedule test"
  timezone    = "Europe/London"
  enabled     = false
}

Debug Output

terraform plan:

  # opsgenie_schedule.london will be created
  + resource "opsgenie_schedule" "london" {
      + description = "schedule test"
      + enabled     = false
      + id          = (known after apply)
      + name        = "genieschedule2"
    }

Note the missing timezone attribute

terraform apply:

  # opsgenie_schedule.london will be created
  + resource "opsgenie_schedule" "london" {
      + description = "schedule test"
      + enabled     = false
      + id          = (known after apply)
      + name        = "genieschedule2"
    }

Plan: 1 to add, 0 to change, 0 to destroy.
opsgenie_schedule.london: Creating...
opsgenie_schedule.london: Creation complete after 4s [id=70294f45-65d5-4a50-bdaf-6a9d98691304]

terraform plan (again):

Terraform will perform the following actions:

  # opsgenie_schedule.london will be updated in-place
  ~ resource "opsgenie_schedule" "london" {
        id          = "70294f45-65d5-4a50-bdaf-6a9d98691304"
        name        = "genieschedule2"
      ~ timezone    = "America/New_York" -> "Europe/London"
        # (2 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

terraform apply (again):

  # opsgenie_schedule.london will be updated in-place
  ~ resource "opsgenie_schedule" "london" {
        id          = "70294f45-65d5-4a50-bdaf-6a9d98691304"
        name        = "genieschedule2"
      ~ timezone    = "America/New_York" -> "Europe/London"
        # (2 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.
opsgenie_schedule.london: Modifying... [id=70294f45-65d5-4a50-bdaf-6a9d98691304]
opsgenie_schedule.london: Modifications complete after 0s [id=70294f45-65d5-4a50-bdaf-6a9d98691304]

Expected Behavior

The opsgenie_schedule should have been created with the Europe/London timezone on the first terraform apply.

Actual Behavior

The opsgenie_schedule was created with the America/New_York timezone, while a second plan/apply sets the timezone to the correct Europe/London TZ.

Steps to Reproduce

  1. Configure a new schedule with timezone Europe/London
  2. terraform apply
  3. terraform apply

Important Factoids

The opsgenie_schedule is created correctly with certain other timezones, for example Europe/Rome works just fine.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions