PagerDuty / terraform-provider-pagerduty

Terraform PagerDuty provider
https://www.terraform.io/docs/providers/pagerduty/
Mozilla Public License 2.0
206 stars 210 forks source link

Invalid new value for .alert_grouping_parameters[0].type #828

Open suzaku opened 7 months ago

suzaku commented 7 months ago

Terraform Version

1.0.8

Affected Resource(s)

Terraform Configuration Files

resource "pagerduty_service" "cluster" {
  name                    = var.cluster_name
  description             = format("\"Kubernetes Engine\" EKS Cluster -  %s", var.cluster_name)
  escalation_policy       = data.pagerduty_escalation_policy.core_infra.id
  alert_creation          = "create_alerts_and_incidents"
}

Debug Output

│ Error: Provider produced inconsistent final plan
│ 
│ When expanding the plan for
│ module.eks.module.eks-observability[0].pagerduty_service.cluster to include
│ new values learned so far during apply, provider
│ "registry.terraform.io/pagerduty/pagerduty" produced an invalid new value
│ for .alert_grouping_parameters[0].type: was cty.StringVal(""), but now
│ null.
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

No error.

Actual Behavior

Incompatible type for optional field.

Steps to Reproduce

  1. terraform apply
imjaroiswebdev commented 7 months ago

Did you try re-applying this? Because I've tried several times to replicate the issue without success. Do you have any more context around this to share that might help us understand this better?

lkashiwa commented 7 months ago

Happens pretty much the same on my side as well. Updated to the last provider version today. All plans/apply were running fine before.

After a successful plan, the apply generated this (tried to re-plan/re-apply several times)

│ Error: Provider produced inconsistent result after apply │ │ When applying changes to pagerduty_business_service.prometheus, provider │ "provider[\"registry.terraform.io/pagerduty/pagerduty\"]" produced an │ unexpected new value: .point_of_contact: was null, but now │ cty.StringVal("xxx xxx"). │ │ This is a bug in the provider, which should be reported in the provider's │ own issue tracker. ╵

suzaku commented 7 months ago

Did you try re-applying this? Because I've tried several times to replicate the issue without success. Do you have any more context around this to share that might help us understand this better?

The version of the provider is 3.9.1, there must be some incompatible changes there.

lkashiwa commented 7 months ago

I am using 3.9.0 here.