Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rslotte opened this issue Nov 28, 2024 · 0 comments

Comments

@rslotte
Copy link

rslotte commented Nov 28, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant