PagerDuty / terraform-provider-pagerduty

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

.endpoint_url: inconsistent values for sensitive in v3.12.0 #869

Closed TechIsCool closed 3 weeks ago

TechIsCool commented 1 month ago

Hey Pagerduty Team,

Really like the unified results that are starting to happen with the TF Plugin Framework, it looks like we have a regression in pagerduty_extension

Terraform Version

$ terraform -v
Terraform v1.8.2
on darwin_arm64
+ provider registry.terraform.io/pagerduty/pagerduty v3.12.0

Affected Resource(s)

Please list the resources as a list, for example:

Terraform Configuration Files

  1. Manually Create a PagerDuty Service
  2. Manually Create a Jira pagerduty extension integration and import it with the Terraform Import Block
terraform {
  required_providers {
    pagerduty = {
      source = "PagerDuty/pagerduty"
      version = "= 3.11.4"
    }
  }
}

import {
  id = “<PD_EXTENSION_ID>”
  to = pagerduty_extension.jira_issue
}
  1. terraform init --upgrade
  2. terraform plan -generate-config-out=generated_resources.tf
  3. terraform apply
  4. Comment out the terraform.required_providers.pagerduty.version in the provider
  5. terraform init --upgrade
  6. terraform apply <- Where it fails

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

Panic Output

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

[2024-05-10T15:19:36.136Z] │ Error: Provider produced inconsistent result after apply
[2024-05-10T15:19:36.136Z] │ 
[2024-05-10T15:19:36.136Z] │ When applying changes to
[2024-05-10T15:19:36.136Z] │ module.pagerduty.pagerduty_extension.default["example"], provider
[2024-05-10T15:19:36.136Z] │ "provider[\"[registry.terraform.io/pagerduty/pagerduty\](http://registry.terraform.io/pagerduty/pagerduty/)"]" produced an
[2024-05-10T15:19:36.136Z] │ unexpected new value: .endpoint_url: inconsistent values for sensitive
[2024-05-10T15:19:36.136Z] │ attribute.
[2024-05-10T15:19:36.136Z] │ 
[2024-05-10T15:19:36.136Z] │ This is a bug in the provider, which should be reported in the provider's
[2024-05-10T15:19:36.136Z] │ own issue tracker.

Expected Behavior

A Successful Apply should occur

Actual Behavior

A failure of Terraform due to inconsistent result

Steps to Reproduce

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

  1. terraform apply

Important Factoids

References

matheusaraujo-hotmart commented 1 month ago

We're encountering the identical issue with the same error message here. Temporarily reverting to the previous version of the provider has mitigated the problem for now.

cjgajard commented 3 weeks ago

Sensitive values like endpoint_url don't get automatically imported. In a generated file like generated_resources.tf it says endpoint_url = null # sensitive:

image

It must be replaced with a safe source for this sensitive value (e.g. endpoint_url = var.some_variable_name) before executing terraform apply

imjaroiswebdev commented 3 weeks ago

Please update your Terraform configuration to use PagerDuty provider v3.13.1 in order to stop facing this issue. Thank you for reporting this issue and for your patience during its resolution.