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

The provider doesn't seem to be handling GetTagWithContext properly #940

Open
themarcelor opened this issue Oct 18, 2024 · 0 comments
Open

Comments

@themarcelor
Copy link

themarcelor commented Oct 18, 2024

Hi,

We've been experiencing an error consistently Error calling GetTagWithContext while trying to run terraform plan to provision some PagerDuty resources and apply TAGS to them.
I suspect this might be related to a change in the PagerDuty API:

curl -s -H 'Content-Type: application/json' -H "Authorization: Token token=${API_TOKEN}" -X GET "https://api.pagerduty.com/tags/PJMK666" | jq .
"Object not found"

And how the provider tries to unmarshal that into a pagerduty.Tag struct instance.

Terraform Version

Terraform v1.6.2

Affected Resource(s)

  • data.pagerduty_tag

Terraform Configuration Files

resource "pagerduty_tag" "composite_name_tag" {
  label = replace(lower(var.composite_name), " ", "-")
}

Debug Output

│ Error: Error calling GetTagWithContext
│ 
│ Could not decode JSON response: json: cannot unmarshal number into Go value
│ of type pagerduty.Tag

Expected Behavior

The GetTagWithContext response was supposed to be unmarshaled successful and the tag was supposed to be used by a pagerduty_tag_assignment resource without problems.

Actual Behavior

I think the provider is failing while trying to determine if the tag already exists so it can update it.
But it just throws this error: Error calling GetTagWithContext.

Steps to Reproduce

  1. terraform plan
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