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

Plugin error when trying to create a datadog_webhook resource. #2676

Open
cphenry opened this issue Nov 14, 2024 · 1 comment · Fixed by #2689
Open

Plugin error when trying to create a datadog_webhook resource. #2676

cphenry opened this issue Nov 14, 2024 · 1 comment · Fixed by #2689
Labels

Comments

@cphenry
Copy link

cphenry commented Nov 14, 2024

Datadog Terraform Provider Version

3.44.1

Terraform Version

v1.9.8

What resources or data sources are affected?

resource_datadog_webhook

Terraform Configuration Files

resource "datadog_webhook" "prism-alerts" {
  name = "Prism-Alerts"
  url  = "https://webexapis.com/v1/webhooks/incoming/Y2lzY29zcGFyazovL3VzL1dFQkhPT0svMmEzNGNlODgtYzVjYy00MWIyLTk5YTUtZDA0ZDM5YTJhMjVm"
}

Relevant debug or panic output

│ Error: Request cancelled

│ with datadog_webhook.prism-dd-nonprod-alerts,
│ on main.tf line 25, in resource "datadog_webhook" "prism-dd-nonprod-alerts":
│ 25: resource "datadog_webhook" "prism-dd-nonprod-alerts" {

│ The plugin.(*GRPCProvider).ApplyResourceChange request was cancelled.

Stack trace from the terraform-provider-datadog_v3.44.1 plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x14aa8bb]

goroutine 107 [running]:
github.com/terraform-providers/terraform-provider-datadog/datadog/fwprovider.(*webhookResource).buildWebhookRequestBody(0xc0008e3348?, {0x0?, 0x1c6f3d8?}, 0xc0004d47e0)
github.com/terraform-providers/terraform-provider-datadog/datadog/fwprovider/resource_datadog_webhook.go:247 +0x17b
github.com/terraform-providers/terraform-provider-datadog/datadog/fwprovider.(*webhookResource).Create(0xc00018d860, {0x1c693c0, 0xc000725bf0}, {{{{0x1c6f3d8, 0xc0008d4810}, {0x16bdd20, 0xc0008d4780}}, {0x1c71a68, 0xc0009fc8c0}}, {{{0x1c6f3d8, ...}, ...}, ...}, ...}, ...)
github.com/terraform-providers/terraform-provider-datadog/datadog/fwprovider/resource_datadog_webhook.go:128 +0x16c
github.com/terraform-providers/terraform-provider-datadog/datadog/fwprovider.(*FrameworkResourceWrapper).Create(0x0?, {0x1c693c0?, 0xc000725bf0?}, {{{{0x1c6f3d8, 0xc0008d4810}, {0x16bdd20, 0xc0008d4780}}, {0x1c71a68, 0xc0009fc8c0}}, {{{0x1c6f3d8, ...}, ...}, ...}, ...}, ...)
github.com/terraform-providers/terraform-provider-datadog/datadog/fwprovider/framework_provider.go:526 +0x5a
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).CreateResource(0xc0001f91e0, {0x1c693c0, 0xc000725bf0}, 0xc000a071f0, 0xc000a071c8)
github.com/hashicorp/[email protected]/internal/fwserver/server_createresource.go:101 +0x578
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ApplyResourceChange(0xc0001f91e0, {0x1c693c0, 0xc000725bf0}, 0xc0008e2e60, 0xc000a072e0)
github.com/hashicorp/[email protected]/internal/fwserver/server_applyresourcechange.go:57 +0x4aa
github.com/hashicorp/terraform-plugin-framework/internal/proto5server.(*Server).ApplyResourceChange(0xc0001f91e0, {0x1c693c0?, 0xc000725ad0?}, 0xc0008e2dc0)
github.com/hashicorp/[email protected]/internal/proto5server/server_applyresourcechange.go:55 +0x38e
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.muxServer.ApplyResourceChange({0xc000329260, 0xc0003292c0, {0xc00057f100, 0x2, 0x2}, {0x0, 0x0, 0x0}, {0x0, 0x0, ...}, ...}, ...)
github.com/hashicorp/[email protected]/tf5muxserver/mux_server_ApplyResourceChange.go:27 +0xf3
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc000322f00, {0x1c693c0?, 0xc000724ba0?}, 0xc0002ae930)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:821 +0x548
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x18e09c0, 0xc000322f00}, {0x1c693c0, 0xc000724ba0}, 0xc0002ae8c0, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:422 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000660000, {0x1c703e0, 0xc0007bc000}, 0xc0004d0000, 0xc0008b9740, 0x2acbec0, 0x0)
google.golang.org/[email protected]/server.go:1335 +0xdb8
google.golang.org/grpc.(*Server).handleStream(0xc000660000, {0x1c703e0, 0xc0007bc000}, 0xc0004d0000, 0x0)
google.golang.org/[email protected]/server.go:1712 +0x9da
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/[email protected]/server.go:947 +0xaf
created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 8
google.golang.org/[email protected]/server.go:958 +0x136

Error: The terraform-provider-datadog_v3.44.1 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Expected Behavior

Resource should have been created.

Actual Behavior

Resource wasn't created. Plugin crashed.

Steps to Reproduce

terraform apply the code snippet above.

Important Factoids

No response

References

No response

@cphenry cphenry added the bug label Nov 14, 2024
@Manan-Kothari
Copy link

Getting this same error with v3.48.1 of the provider

@nkzou nkzou linked a pull request Nov 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants