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

Unable to use cloudflare_api_token_permissions_groups in 5.0.0-rc1 #4927

Open
3 tasks done
polc opened this issue Jan 22, 2025 · 2 comments
Open
3 tasks done

Unable to use cloudflare_api_token_permissions_groups in 5.0.0-rc1 #4927

polc opened this issue Jan 22, 2025 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@polc
Copy link

polc commented Jan 22, 2025

Confirmation

  • This is a bug with an existing resource and is not a feature request or enhancement. Feature requests should be submitted with Cloudflare Support or your account team.
  • I have searched the issue tracker and my issue isn't already found.
  • I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version

Terraform v1.10.2
on linux_amd64
+ provider registry.terraform.io/cloudflare/cloudflare v5.0.0-rc1
+ provider registry.terraform.io/hetznercloud/hcloud v1.49.1
+ provider registry.terraform.io/integrations/github v6.5.0

Affected resource(s)

  • cloudflare_api_token_permissions_groups

Terraform configuration files

data "cloudflare_account" "main" {
  account_id = var.cloudflare_account_id
}

data "cloudflare_api_token_permissions_groups" "main" {}

Panic output

╷
│ Error: Request cancelled
│
│ The plugin6.(*GRPCProvider).ReadDataSource request was cancelled.
╵
╷
│ Error: Plugin did not respond
│
│ The plugin encountered an error, and failed to respond to the plugin6.(*GRPCProvider).ReadDataSource call. The plugin logs may contain more details.
╵

Stack trace from the terraform-provider-cloudflare_v5.0.0-rc1 plugin:

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

goroutine 16 [running]:
github.com/cloudflare/terraform-provider-cloudflare/internal/services/api_token_permissions_groups.(*APITokenPermissionsGroupsDataSourceModel).toListParams(...)
        github.com/cloudflare/terraform-provider-cloudflare/internal/services/api_token_permissions_groups/data_source_model.go:25
github.com/cloudflare/terraform-provider-cloudflare/internal/services/api_token_permissions_groups.(*APITokenPermissionsGroupsDataSource).Read(0xc000f066d8, {0x4388e08, 0xc000d19950}, {{{{0x440f038, 0xc000d19ef0}, {0x349a760, 0xc000d19e60}}, {0x443da78, 0xc000150000}}, {{{0x0, ...}, ...}, ...}, ...}, ...)
        github.com/cloudflare/terraform-provider-cloudflare/internal/services/api_token_permissions_groups/data_source.go:56 +0x167
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ReadDataSource(0xc000817b08, {0x4388e08, 0xc000d19950}, 0xc000150600, 0xc000de1640)
        github.com/hashicorp/[email protected]/internal/fwserver/server_readdatasource.go:103 +0x751
github.com/hashicorp/terraform-plugin-framework/internal/proto6server.(*Server).ReadDataSource(0xc000817b08, {0x4388e08?, 0xc000d19860?}, 0xc000d19800)
        github.com/hashicorp/[email protected]/internal/proto6server/server_readdatasource.go:55 +0x389
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ReadDataSource(0xc000bf6960, {0x4388e08?, 0xc000d18ea0?}, 0xc000da4780)
        github.com/hashicorp/[email protected]/tfprotov6/tf6server/server.go:688 +0x26d
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ReadDataSource_Handler({0x3d977c0, 0xc000bf6960}, {0x4388e08, 0xc000d18ea0}, 0xc00004dd00, 0x0)
        github.com/hashicorp/[email protected]/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:665 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000e1600, {0x4388e08, 0xc000d18e10}, {0x4419e60, 0xc000e02000}, 0xc000808d80, 0xc000ce8180, 0x7688800, 0x0)
        google.golang.org/[email protected]/server.go:1394 +0xe2b
google.golang.org/grpc.(*Server).handleStream(0xc0000e1600, {0x4419e60, 0xc000e02000}, 0xc000808d80)
        google.golang.org/[email protected]/server.go:1805 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/[email protected]/server.go:1029 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 36
        google.golang.org/[email protected]/server.go:1040 +0x125

Error: The terraform-provider-cloudflare_v5.0.0-rc1 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.

2025-01-22T20:54:20.665+0100 [DEBUG] provider: plugin exited
2025-01-22T20:54:20.666+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-01-22T20:54:20.667+0100 [INFO]  provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/integrations/github/6.5.0/linux_amd64/terraform-provider-github_v6.5.0 id=11107
2025-01-22T20:54:20.667+0100 [DEBUG] provider: plugin exited

Steps to reproduce

Run : terraform apply

@polc polc added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 22, 2025
Copy link

Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of TF_LOG=DEBUG output to be provided. The only parts that should be redacted are your user credentials in the X-Auth-Key, X-Auth-Email and Authorization HTTP headers. Details such as zone or account identifiers are not considered sensitive but can be redacted if you are very cautious. This log file provides additional context from Terraform, the provider and the Cloudflare API that helps in debugging issues. Without it, maintainers are very limited in what they can do and may hamper diagnosis efforts.

This issue has been marked with triage/needs-information and is unlikely to receive maintainer attention until the log file is provided making this a complete bug report.

@github-actions github-actions bot added triage/needs-information Indicates an issue needs more information in order to work on it. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 22, 2025
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

1 participant