Skip to content

[BUG]: crash while trying to apply "github_organization_custom_properties" and "github_repository_custom_property" #3358

@C302

Description

@C302

Expected Behavior

That the provider works

Actual Behavior

Provider crashes

Terraform Version

2026-04-22T09:36:03.618Z [INFO] OpenTofu version: 1.10.6
2026-04-22T09:36:03.618Z [DEBUG] using github.com/hashicorp/go-tfe v1.53.0
2026-04-22T09:36:03.618Z [DEBUG] using github.com/opentofu/hcl/v2 v2.20.2-0.20250121132637-504036cd70e7
2026-04-22T09:36:03.619Z [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2026-04-22T09:36:03.619Z [DEBUG] using github.com/zclconf/go-cty v1.16.3
2026-04-22T09:36:03.619Z [INFO] Go runtime version: go1.24.6
2026-04-22T09:36:03.619Z [INFO] CLI args: []string{"/usr/bin/tofu", "--version"}
2026-04-22T09:36:03.619Z [DEBUG] Attempting to open CLI config file: /home/user/.terraformrc
2026-04-22T09:36:03.619Z [INFO] Loading CLI configuration from /home/user/.terraformrc
2026-04-22T09:36:03.619Z [DEBUG] Explicit provider installation configuration is set
2026-04-22T09:36:03.619Z [DEBUG] Found the config directory: /home/user/.terraform.d
2026-04-22T09:36:03.621Z [INFO] CLI command args: []string{"version", "--version"}
2026-04-22T09:36:03.629Z [DEBUG] Provider registry.opentofu.org/hashicorp/ad is overridden by dev_overrides
OpenTofu v1.10.6
on linux_amd64

  • provider registry.opentofu.org/carlpett/sops v1.0.0
  • provider registry.opentofu.org/integrations/github v6.11.1

Affected Resource(s)

  • github_organization_custom_properties
  • github_repository_custom_property

Terraform Configuration Files

Steps to Reproduce

No response

Debug Output

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

panic: runtime error: index out of range [0] with length 0

goroutine 80 [running]:
github.com/integrations/terraform-provider-github/v6/github.resourceGithubRepositoryCustomPropertyCreate(0xc000176480, {0xebf600, 0xc000a1c140})
        github.com/integrations/terraform-provider-github/v6/github/resource_github_repository_custom_property.go:72 +0x698
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x12a5938?, {0x12a5938?, 0xc0008c0bd0?}, 0xd?, {0xebf600?, 0xc000a1c140?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.38.1/helper/schema/resource.go:837 +0x15f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000492800, {0x12a5938, 0xc0008c0bd0}, 0xc0001389c0, 0xc000176360, {0xebf600, 0xc000a1c140})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.38.1/helper/schema/resource.go:980 +0xb47
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc000376510, {0x12a5938?, 0xc0008c0b10?}, 0xc000a5e190)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.38.1/helper/schema/grpc_provider.go:1499 +0x1085
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc00027bae0, {0x12a5938?, 0xc00063a960?}, 0xc0003d6600)
        github.com/hashicorp/terraform-plugin-go@v0.29.0/tfprotov5/tf5server/server.go:944 +0x3b9
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x10e91e0, 0xc00027bae0}, {0x12a5938, 0xc00063a960}, 0xc0003d6480, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.29.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:789 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00026a200, {0x12a5938, 0xc00063a8d0}, 0xc000116240, 0xc0004e1ad0, 0x1a7aca8, 0x0)
        google.golang.org/grpc@v1.75.1/server.go:1431 +0x1036
google.golang.org/grpc.(*Server).handleStream(0xc00026a200, {0x12a6278, 0xc000536340}, 0xc000116240)
        google.golang.org/grpc@v1.75.1/server.go:1842 +0xb88
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/grpc@v1.75.1/server.go:1061 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 66
        google.golang.org/grpc@v1.75.1/server.go:1072 +0x11d

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

2026-04-22T09:26:00.049Z [DEBUG] provider: plugin exited

Panic Output

Code of Conduct

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is being looked at and prioritizedType: BugSomething isn't working as documented

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions