Skip to content

[BUG]: plugin crashed during terraform plan #2737

Closed

Description

@osoriohj

Expected Behavior

terraform plan should have succeeded

Actual Behavior

github plugin stopped responding before terraform plan completed

Terraform Version

❯ terraform version
Terraform v1.12.2
on darwin_amd64

  • provider registry.terraform.io/hashicorp/github v6.6.0
  • provider registry.terraform.io/integrations/github v6.6.0

Affected Resource(s)

  • github_repository_ruleset
  • github_actions_environment_variable

Terraform Configuration Files

Steps to Reproduce

terraform plan

Debug Output

Panic Output

Plan: 9 to add, 1 to change, 0 to destroy.

Error: Request cancelled

  with module.github.module.github_repository["firmware-portal"].github_repository_ruleset.this["Default Branch - Commit Policy"],
  on ../../modules/github-repository/main.tf line 1, in resource "github_repository_ruleset" "this":
   1: resource "github_repository_ruleset" "this" {

The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.

Error: Request cancelled

  with module.github.module.github_repository["zlp"].github_repository_ruleset.this["Default Branch - Commit Policy"],
  on ../../modules/github-repository/main.tf line 1, in resource "github_repository_ruleset" "this":
   1: resource "github_repository_ruleset" "this" {

The plugin.(*GRPCProvider).ValidateResourceConfig request was cancelled.

Error: Plugin did not respond

  with module.github.module.github_repository["wifi-devices"].github_repository_ruleset.this["Default Branch - Deletion Protection"],
  on ../../modules/github-repository/main.tf line 1, in resource "github_repository_ruleset" "this":
   1: resource "github_repository_ruleset" "this" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

Error: Plugin did not respond

  with module.github.github_actions_environment_variable.wifi-cloud_wifi-prd-jpn_aws_account_id,
  on ../../modules/github/github-environments.tf line 156, in resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_aws_account_id":
 156: resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_aws_account_id" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

Error: GET https://api.github.com/repos/zainar/wifi-cloud/environments/wifi-prd-jpn/variables/AWS_REGION: 403 API rate limit of 5000 still exceeded until 2025-08-21 10:28:35 -0400 -04, not making remote request. [rate reset in 1m12s]

  with module.github.github_actions_environment_variable.wifi-cloud_wifi-prd-jpn_aws_region,
  on ../../modules/github/github-environments.tf line 163, in resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_aws_region":
 163: resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_aws_region" {


Error: GET https://api.github.com/repos/zainar/wifi-cloud/environments/wifi-prd-jpn/variables/ENVIRONMENT_NAME: 403 API rate limit of 5000 still exceeded until 2025-08-21 10:28:35 -0400 -04, not making remote request. [rate reset in 1m12s]

  with module.github.github_actions_environment_variable.wifi-cloud_wifi-prd-jpn_environment_name,
  on ../../modules/github/github-environments.tf line 170, in resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_environment_name":
 170: resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_environment_name" {


Error: Request cancelled

  with module.github.github_actions_environment_variable.wifi-cloud_wifi-prd-jpn_dashboard_bucket,
  on ../../modules/github/github-environments.tf line 177, in resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_dashboard_bucket":
 177: resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_dashboard_bucket" {

The plugin.(*GRPCProvider).ReadResource request was cancelled.

Error: Plugin did not respond

  with module.github.github_actions_environment_variable.wifi-cloud_wifi-prd-jpn_dashboard_distribution,
  on ../../modules/github/github-environments.tf line 184, in resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_dashboard_distribution":
 184: resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_dashboard_distribution" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

Error: Plugin did not respond

  with module.github.github_actions_environment_variable.wifi-cloud_wifi-prd-jpn_proxy_dashboard_bucket,
  on ../../modules/github/github-environments.tf line 191, in resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_proxy_dashboard_bucket":
 191: resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_proxy_dashboard_bucket" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

Error: GET https://api.github.com/repos/zainar/wifi-cloud/environments/wifi-prd-jpn/variables/PROXY_DASHBOARD_DISTRIBUTION_ID: 403 API rate limit of 5000 still exceeded until 2025-08-21 10:28:35 -0400 -04, not making remote request. [rate reset in 1m12s]

  with module.github.github_actions_environment_variable.wifi-cloud_wifi-prd-jpn_proxy_dashboard_distribution,
  on ../../modules/github/github-environments.tf line 198, in resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_proxy_dashboard_distribution":
 198: resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_proxy_dashboard_distribution" {


Error: GET https://api.github.com/repos/zainar/wifi-cloud/environments/wifi-prd-jpn/variables/EKS_CLUSTER_NAME: 403 API rate limit of 5000 still exceeded until 2025-08-21 10:28:35 -0400 -04, not making remote request. [rate reset in 1m12s]

  with module.github.github_actions_environment_variable.wifi-cloud_wifi-prd-jpn_cluster_name,
  on ../../modules/github/github-environments.tf line 205, in resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_cluster_name":
 205: resource "github_actions_environment_variable" "wifi-cloud_wifi-prd-jpn_cluster_name" {


Error: Plugin did not respond

  with module.github.github_actions_environment_variable.ilaas_ilaas-prd-apac_aws_account_id,
  on ../../modules/github/github-environments.tf line 548, in resource "github_actions_environment_variable" "ilaas_ilaas-prd-apac_aws_account_id":
 548: resource "github_actions_environment_variable" "ilaas_ilaas-prd-apac_aws_account_id" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

Error: Plugin did not respond

  with module.github.github_actions_environment_variable.ilaas_ilaas-prd-apac_zps_cloudfront_distribution,
  on ../../modules/github/github-environments.tf line 569, in resource "github_actions_environment_variable" "ilaas_ilaas-prd-apac_zps_cloudfront_distribution":
 569: resource "github_actions_environment_variable" "ilaas_ilaas-prd-apac_zps_cloudfront_distribution" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

Error: Request cancelled

  with module.github.github_actions_environment_variable.ilaas_ilaas-prd-apac_scrappy_cloudfront_distribution,
  on ../../modules/github/github-environments.tf line 583, in resource "github_actions_environment_variable" "ilaas_ilaas-prd-apac_scrappy_cloudfront_distribution":
 583: resource "github_actions_environment_variable" "ilaas_ilaas-prd-apac_scrappy_cloudfront_distribution" {

The plugin.(*GRPCProvider).ReadResource request was cancelled.

Error: Plugin did not respond

  with module.github.github_actions_environment_variable.ilaas_ilaas-prd-apac_scrappy_vite_aws_region,
  on ../../modules/github/github-environments.tf line 598, in resource "github_actions_environment_variable" "ilaas_ilaas-prd-apac_scrappy_vite_aws_region":
 598: resource "github_actions_environment_variable" "ilaas_ilaas-prd-apac_scrappy_vite_aws_region" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

Error: Plugin did not respond

  with module.github.github_actions_environment_variable.ilaas_ilaas-prd-apac_scrappy_cognito_identity_pool_id_ilaas_prd-apac,
  on ../../modules/github/github-environments.tf line 605, in resource "github_actions_environment_variable" "ilaas_ilaas-prd-apac_scrappy_cognito_identity_pool_id_ilaas_prd-apac":
 605: resource "github_actions_environment_variable" "ilaas_ilaas-prd-apac_scrappy_cognito_identity_pool_id_ilaas_prd-apac" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

Stack trace from the terraform-provider-github_v6.6.0 plugin:

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

goroutine 6591 [running]:
github.com/integrations/terraform-provider-github/v6/github.resourceGithubRepositoryRulesetRead(0xc000580800, {0xb56b8a0?, 0xc0002cf780?})
	github.com/integrations/terraform-provider-github/v6/github/resource_github_repository_ruleset.go:580 +0x567
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xb762e70?, {0xb762e70?, 0xc0006d62a0?}, 0xd?, {0xb56b8a0?, 0xc0002cf780?})
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:811 +0x15f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0004597a0, {0xb762e70, 0xc0006d62a0}, 0xc0000badd0, {0xb56b8a0, 0xc0002cf780})
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:1117 +0x529
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc000354738, {0xb762e70?, 0xc0006d61e0?}, 0xc00083d980)
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:708 +0x6c5
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc00026b900, {0xb762e70?, 0xc000895980?}, 0xc000710e00)
	github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:783 +0x309
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xb71c140, 0xc00026b900}, {0xb762e70, 0xc000895980}, 0xc00062fe00, 0x0)
	github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:482 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000197000, {0xb762e70, 0xc0008958f0}, {0xb767728, 0xc000276300}, 0xc00016d680, 0xc0004c6ae0, 0xbdf8688, 0x0)
	google.golang.org/[email protected]/server.go:1369 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc000197000, {0xb767728, 0xc000276300}, 0xc00016d680)
	google.golang.org/[email protected]/server.go:1780 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
	google.golang.org/[email protected]/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 15
	google.golang.org/[email protected]/server.go:1030 +0x125

Error: The terraform-provider-github_v6.6.0 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.%

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    Type: Bug
    Status: Triage
    on Aug 21, 2025
  2. dylan-budgen commented on Aug 29, 2025

    @dylan-budgen

    I am experiencing the same issue

  3. pickgr commented on Sep 10, 2025

    @pickgr
  4. nakamasato commented on Sep 19, 2025

    @nakamasato

    I also encountered this issue. I disabled automatic copilot review and successfully passed.

    Image

    #2641 supporting automatic copilot review would be a solution but before that hopefully plan and apply remain unaffected by manual configuration.

  5. nnellanspdl commented on Sep 30, 2025

    @nnellanspdl

    Can we please get an update to the provider to support the Automatic Code Review feature of Rulesets?

    It causes crashes in the following scenarios, as hightlighted above:

    • Using Terraform to create & manage Rulesets
    • Manually enabling Automatic Code Review without using Terraform (since this feature is not supported in the provider)

    This causes the provider to crash.

    We must now disable Automatic Code Review since we can't use it due to the Terraform crashes.

    Edit: Currently, in the GitHub UI, there are 2 different spots where you can enable Copilot Code Review on a Ruleset. One causes the provider to crash, and one does not.

    • The original way is to enable Copilot Code Review under the Ruleset's pull request settings. This way is okay, and does not crash the terraform provider.
    • The new way is to enabled Copilot Code Review at the top level of the Ruleset. If I look at the API response for the Ruleset, this creates a new "Rule" on the ruleset, whereas the above method is a setting under the Pull Request "rule". This second way of doing it causes the provider to crash.
  6. moved this from Backlog to In Review in Terraform Provideron Oct 21, 2025
  7. moved this from In Review to On Deck in Terraform Provideron Oct 22, 2025
  8. moved this from On Deck to In Progress in Terraform Provideron Oct 27, 2025
  9. moved this from In Progress to In Review in Terraform Provideron Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageType: Bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions