Repository navigation
Closed
Labels
Type: BugSomething isn't working as documented
Description
Expected Behavior
When running terraform plan or apply, the resource github_organization_ruleset should get read properly
Actual Behavior
Terraform plugin crashes when trying to read github_organization_ruleset
The bug with github_organization_ruleset has supposedly been solved with #2542
But it appears that the resource is bugged in v6.7.5, now with a different cause for the crash
Terraform Version
Terraform 1.12.2 on on linux_amd64
Affected Resource(s)
- github_organization_ruleset
Terraform Configuration Files
Steps to Reproduce
terraform plan
Debug Output
│ Error: Plugin did not respond
│
│ with github_organization_ruleset.pr_check,
│ on _global.tf line 7, in resource "github_organization_ruleset" "pr_check":
│ 7: resource "github_organization_ruleset" "pr_check" {
│
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
│ details.Panic Output
Stack trace from the terraform-provider-github_v6.7.5 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xc7612d]
goroutine 596 [running]:
github.com/integrations/terraform-provider-github/v6/github.resourceGithubOrganizationRulesetRead(0xc00031d880, {0xd43240?, 0xc000263500?})
github.com/integrations/terraform-provider-github/v6/github/resource_github_organization_ruleset.go:572 +0x56d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x108e0d0?, {0x108e0d0?, 0xc000884900?}, 0xd?, {0xd43240?, 0xc000263500?})
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(0xc00039b180, {0x108e0d0, 0xc000884900}, 0xc00067af70, {0xd43240, 0xc000263500})
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(0xc0002e8690, {0x108e0d0?, 0xc000884840?}, 0xc0006e1440)
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(0xc0001e7900, {0x108e0d0?, 0xc0006ebf20?}, 0xc00097c000)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:783 +0x309
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xeef4c0, 0xc0001e7900}, {0x108e0d0, 0xc0006ebf20}, 0xc00031cd80, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:482 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00010b000, {0x108e0d0, 0xc0006ebe90}, {0x10929c8, 0xc0001f6300}, 0xc000978b40, 0xc00044ef90, 0x1731528, 0x0)
google.golang.org/[email protected]/server.go:1369 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc00010b000, {0x10929c8, 0xc0001f6300}, 0xc000978b40)
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 12
google.golang.org/[email protected]/server.go:1030 +0x125
Error: The terraform-provider-github_v6.7.5 plugin crashed!Code of Conduct
- I agree to follow this project's Code of Conduct
Reacted by Dragan Bjekić, Enes Hanic, Lino E Carrillo and Luca Borruto
Metadata
Metadata
Assignees
Labels
Type: BugSomething isn't working as documented
Type
Projects
- StatusShow more project fieldsDone
Activity
[-][BUG]: v6.7.5 SIGSEGV when reading resource github_organization_ruleset in terrafrom plan[/-][+][BUG]: v6.7.5 SIGSEGV when reading resource github_organization_ruleset[/+]lborruto commentedon Nov 7, 2025
fyi; same issue on my side, but on v6.0.0 (Terraform v1.13.5):
lborruto commentedon Nov 13, 2025
@ironstar94 I found a fix — I deleted all mentions of
github_organization_rulesetfrom my tfstate, manually deleted the ruleset on GitHub, and then ran a new apply.ironstar94 commentedon Nov 13, 2025
@lborruto That crashes on the next run when it tries a refresh
lborruto commentedon Nov 13, 2025
Can I have a look at your terraform code for
github_organization_ruleset?stevehipwell commentedon Nov 13, 2025
Could you get the ruleset out of the REST API and post it here so we can figure out why it can't be read?
ironstar94 commentedon Nov 14, 2025
stevehipwell commentedon Nov 14, 2025
@ironstar94 what does your TF configuration look like?
stevehipwell commentedon Nov 14, 2025
@ironstar94 and when was the last time this worked if ever? It'd also be useful to know which provider version was used to create the resource?
ironstar94 commentedon Nov 14, 2025
Sorry, should have included with the other one
ironstar94 commentedon Nov 14, 2025
We saw this crashing immediately with v6.7.5. We tried creating it with v6.4.0 and that worked, but moving back to v6.7.5 results in SIGSEGV.
stevehipwell commentedon Nov 14, 2025
@ironstar94 your bypass mode looks invalid?
It looks like you may be able to add the
do_not_enforce_on_createvalue to therequired_status_checks?If the above doesn't work you might be able to use a
removeblock followed by animportblock to re import this resource without issue.stevehipwell commentedon Jan 15, 2026
@ironstar94 could you please check if this is still an issue with the latest provider version?