opsgenie / terraform-provider-opsgenie

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

removing tags from heartbeats does not change anything in opsgenie #336

Open faust64 opened 1 year ago

faust64 commented 1 year ago

Terraform Version

Terraform v1.2.7
on linux_amd64
+ provider registry.terraform.io/community-terraform-providers/ignition v2.1.3
+ provider registry.terraform.io/hashicorp/aws v4.33.0
+ provider registry.terraform.io/hashicorp/cloudinit v2.2.0
+ provider registry.terraform.io/hashicorp/external v2.2.2
+ provider registry.terraform.io/hashicorp/local v2.2.3
+ provider registry.terraform.io/hashicorp/null v3.1.1
+ provider registry.terraform.io/hashicorp/random v3.4.3
+ provider registry.terraform.io/hashicorp/time v0.8.0
+ provider registry.terraform.io/hashicorp/tls v4.0.3
+ provider registry.terraform.io/integrations/github v4.31.0
+ provider registry.terraform.io/opsgenie/opsgenie v0.6.15

Affected Resource(s)

Terraform Configuration Files

data "opsgenie_team" "my-team" {
  name = "My Team Name"
}

resource "opsgenie_heartbeat" "nfra_monitoring_heartbeat" {
  name           = "infra-monitoring-maint4"
  description    = "Heatbeat receiver for blabla"
  interval_unit  = "minutes"
  interval       = 15  enabled        = true
  alert_message  = "infra-monitoring stack is down"
  alert_priority = "P2"
  alert_tags     = ["foo", "bar", "maint4"]
  owner_team_id  = data.opsgenie_team.my-team.id
}

Debug Output

  # module.toto.opsgenie_heartbeat.infra_monitoring_heartbeat will be updated in-place
  ~ resource "opsgenie_heartbeat" "infra_monitoring_heartbeat" {
      ~ alert_tags     = [
          - "maint",
            # (3 unchanged elements hidden)
        ]
        id             = "infra-monitoring-maint4"
        name           = "infra-monitoring-maint4"
        # (7 unchanged attributes hidden)
    }

Panic Output

N/A

Expected Behavior

After applying such a plan, the next plan should no longer report any diff on that object.

Actual Behavior

Apply "works" / terraform does not crash, reports done updating integration. While if I run another plan, I would still see this change.

Checking opsgenie, I can confirm my tag is still here.

Steps to Reproduce

  1. terraform plan & terraform apply
  2. remove one of your heartbeat tags
  3. terraform plan & terraform apply
  4. the re-run a plan: there should be no diff.

Important Factoids

N/A

References

not to my knowledge

alexandre-sk5 commented 10 months ago

Hello,

We have the same problem, even using the latest available provider.