Skip to content

[BUG]: Regression in v6.7.0 for github_actions_organization_secret produce invalid state #2804

Closed

Description

@0x46616c6b

Relates to: #2843

Expected Behavior

Plan and apply for github_actions_organization_secret should work after upgrading to 6.7.0.

Actual Behavior

After updating from 6.6.0 to 6.7.0nothing should break to my existinggithub_actions_organization_secret` resources. The plan produces a diff:

  # github_actions_organization_secret.this["NPM_TOKEN"] will be updated in-place
!   resource "github_actions_organization_secret" "this" {
+       destroy_on_drift        = true
        id                      = "NPM_TOKEN"
        # (7 unchanged attributes hidden)
    }

and the apply failed with

Error: Provider produced inconsistent result after apply
When applying changes to github_actions_organization_secret.this["NPM_TOKEN"], provider "provider["registry.terraform.io/integrations/github"]" produced an unexpected new value: Root object was present, but now absent.

This is a bug in the provider, which should be reported in the provider's own issue tracker.

Terraform Version

Terraform v1.10.5
on linux_amd64

Affected Resource(s)

  • github_actions_organization_secret

Terraform Configuration Files

variable "github_app_id" {
  default = "<REDACTED>"
  type    = string
}

variable "github_app_installation_id" {
  default = "<REDACTED>"
  type    = string
}

variable "github_app_pem_file" {
  type = string
}

provider "github" {
  app_auth {
    id              = var.github_app_id
    installation_id = var.github_app_installation_id
    pem_file        = var.github_app_pem_file
  }

  parallel_requests = true
  write_delay_ms    = 200
}

terraform {
  required_providers {
    github = {
      source  = "integrations/github"
      version = "6.7.0"
    }
  }

  backend "remote" {
    hostname     = "<REDACTED>"
    organization = "<REDACTED>"

    workspaces {
      name = "<REDACTED>"
    }
  }
}

Steps to Reproduce

No response

Debug Output

2025-10-23T09:08:51.471Z [WARN]  Provider "registry.terraform.io/integrations/github" produced an invalid plan for github_actions_organization_secret.this["NPM_TOKEN"], but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .destroy_on_drift: planned value cty.True for a non-computed attribute
      - .plaintext_value: sensitive planned value for a non-computed attribute
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Sending request downstream: @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/downstream_request.go:22 @module=sdk.proto tf_proto_version=5.6 tf_provider_addr=provider tf_req_id=a444093c-3ab7-d195-e9e2-637e037881c3 tf_resource_type=github_actions_organization_secret tf_rpc=PlanResourceChange timestamp=2025-10-23T09:08:51.467Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Served request: tf_provider_addr=provider tf_req_id=8773c630-21c5-7e2c-1565-9363b8d6f531 tf_resource_type=github_actions_organization_secret @caller=github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:734 @module=sdk.proto tf_proto_version=5.6 tf_rpc=ValidateResourceTypeConfig timestamp=2025-10-23T09:08:51.467Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Received request: tf_provider_addr=provider tf_req_id=2f878911-0a52-31d4-020f-34c09d96cecb tf_resource_type=github_actions_organization_secret @module=sdk.proto tf_proto_version=5.6 tf_rpc=PlanResourceChange @caller=github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:811 timestamp=2025-10-23T09:08:51.467Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Announced client capabilities: tf_client_capability_deferral_allowed=true tf_proto_version=5.6 tf_req_id=2f878911-0a52-31d4-020f-34c09d96cecb @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/client_capabilities.go:66 @module=sdk.proto tf_resource_type=github_actions_organization_secret tf_rpc=PlanResourceChange tf_provider_addr=provider timestamp=2025-10-23T09:08:51.467Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Sending request downstream: tf_proto_version=5.6 tf_req_id=2f878911-0a52-31d4-020f-34c09d96cecb tf_resource_type=github_actions_organization_secret tf_rpc=PlanResourceChange @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/downstream_request.go:22 @module=sdk.proto tf_provider_addr=provider timestamp=2025-10-23T09:08:51.467Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Received downstream response: @module=sdk.proto tf_proto_version=5.6 tf_resource_type=github_actions_organization_secret @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/downstream_request.go:42 tf_req_duration_ms=0 tf_req_id=a444093c-3ab7-d195-e9e2-637e037881c3 tf_rpc=PlanResourceChange diagnostic_error_count=0 diagnostic_warning_count=0 tf_provider_addr=provider timestamp=2025-10-23T09:08:51.468Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Served request: @module=sdk.proto tf_provider_addr=provider tf_rpc=PlanResourceChange @caller=github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:843 tf_proto_version=5.6 tf_req_id=a444093c-3ab7-d195-e9e2-637e037881c3 tf_resource_type=github_actions_organization_secret timestamp=2025-10-23T09:08:51.468Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Received downstream response: diagnostic_error_count=0 diagnostic_warning_count=0 tf_proto_version=5.6 tf_provider_addr=provider tf_rpc=PlanResourceChange tf_resource_type=github_actions_organization_secret @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/downstream_request.go:42 @module=sdk.proto tf_req_duration_ms=0 tf_req_id=2f878911-0a52-31d4-020f-34c09d96cecb timestamp=2025-10-23T09:08:51.468Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Served request: tf_proto_version=5.6 tf_req_id=2f878911-0a52-31d4-020f-34c09d96cecb tf_resource_type=github_actions_organization_secret tf_rpc=PlanResourceChange @module=sdk.proto tf_provider_addr=provider @caller=github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:843 timestamp=2025-10-23T09:08:51.468Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Received request: @module=sdk.proto tf_proto_version=5.6 tf_req_id=3a145939-cb70-bb78-d71d-deaff3e439f3 tf_resource_type=github_actions_organization_secret @caller=github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:811 tf_provider_addr=provider tf_rpc=PlanResourceChange timestamp=2025-10-23T09:08:51.468Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Announced client capabilities: tf_proto_version=5.6 tf_provider_addr=provider tf_req_id=3a145939-cb70-bb78-d71d-deaff3e439f3 tf_resource_type=github_actions_organization_secret @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/client_capabilities.go:66 @module=sdk.proto tf_client_capability_deferral_allowed=true tf_rpc=PlanResourceChange timestamp=2025-10-23T09:08:51.468Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Sending request downstream: tf_req_id=3a145939-cb70-bb78-d71d-deaff3e439f3 tf_rpc=PlanResourceChange @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/downstream_request.go:22 @module=sdk.proto tf_proto_version=5.6 tf_provider_addr=provider tf_resource_type=github_actions_organization_secret timestamp=2025-10-23T09:08:51.468Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Received request: tf_resource_type=github_actions_organization_secret @caller=github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:714 @module=sdk.proto tf_provider_addr=provider tf_rpc=ValidateResourceTypeConfig tf_proto_version=5.6 tf_req_id=5cc31188-ef6d-2f13-e33e-989da3e9a2d4 timestamp=2025-10-23T09:08:51.468Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Sending request downstream: tf_resource_type=github_actions_organization_secret @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/downstream_request.go:22 tf_proto_version=5.6 tf_provider_addr=provider tf_req_id=5cc31188-ef6d-2f13-e33e-989da3e9a2d4 tf_rpc=ValidateResourceTypeConfig @module=sdk.proto timestamp=2025-10-23T09:08:51.468Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Calling downstream: tf_provider_addr=provider tf_resource_type=github_actions_organization_secret @module=sdk.helper_schema tf_req_id=5cc31188-ef6d-2f13-e33e-989da3e9a2d4 tf_rpc=ValidateResourceTypeConfig @caller=github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:287 timestamp=2025-10-23T09:08:51.468Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Received request: tf_provider_addr=provider tf_req_id=df1cf398-3930-01ba-221c-76b4f76dd5e3 tf_rpc=PlanResourceChange @caller=github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:811 @module=sdk.proto tf_proto_version=5.6 tf_resource_type=github_actions_organization_secret timestamp=2025-10-23T09:08:51.468Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Announced client capabilities: tf_req_id=df1cf398-3930-01ba-221c-76b4f76dd5e3 tf_resource_type=github_actions_organization_secret @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/client_capabilities.go:66 @module=sdk.proto tf_client_capability_deferral_allowed=true tf_proto_version=5.6 tf_provider_addr=provider tf_rpc=PlanResourceChange timestamp=2025-10-23T09:08:51.468Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Sending request downstream: @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/downstream_request.go:22 tf_provider_addr=provider tf_req_id=df1cf398-3930-01ba-221c-76b4f76dd5e3 @module=sdk.proto tf_proto_version=5.6 tf_resource_type=github_actions_organization_secret tf_rpc=PlanResourceChange timestamp=2025-10-23T09:08:51.469Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Received downstream response: tf_rpc=PlanResourceChange @module=sdk.proto tf_proto_version=5.6 diagnostic_error_count=0 diagnostic_warning_count=0 tf_provider_addr=provider tf_req_duration_ms=1 tf_req_id=3a145939-cb70-bb78-d71d-deaff3e439f3 @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/downstream_request.go:42 tf_resource_type=github_actions_organization_secret timestamp=2025-10-23T09:08:51.470Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Served request: tf_provider_addr=provider tf_resource_type=github_actions_organization_secret tf_rpc=PlanResourceChange @module=sdk.proto tf_proto_version=5.6 tf_req_id=3a145939-cb70-bb78-d71d-deaff3e439f3 @caller=github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:843 timestamp=2025-10-23T09:08:51.470Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Received request: tf_req_id=5f570286-eb84-2890-d7d8-1c61222e105e tf_resource_type=github_actions_organization_secret tf_provider_addr=provider tf_rpc=PlanResourceChange @caller=github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:811 @module=sdk.proto tf_proto_version=5.6 timestamp=2025-10-23T09:08:51.470Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Announced client capabilities: @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/client_capabilities.go:66 @module=sdk.proto tf_client_capability_deferral_allowed=true tf_proto_version=5.6 tf_provider_addr=provider tf_req_id=5f570286-eb84-2890-d7d8-1c61222e105e tf_resource_type=github_actions_organization_secret tf_rpc=PlanResourceChange timestamp=2025-10-23T09:08:51.470Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Sending request downstream: tf_proto_version=5.6 tf_resource_type=github_actions_organization_secret @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/downstream_request.go:22 @module=sdk.proto tf_provider_addr=provider tf_req_id=5f570286-eb84-2890-d7d8-1c61222e105e tf_rpc=PlanResourceChange timestamp=2025-10-23T09:08:51.470Z
2025-10-23T09:08:51.472Z [TRACE] provider.terraform-provider-github_v6.7.0: Received downstream response: @module=sdk.proto diagnostic_error_count=0 diagnostic_warning_count=0 tf_provider_addr=provider tf_req_duration_ms=0 @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/downstream_request.go:42 tf_rpc=PlanResourceChange tf_resource_type=github_actions_organization_secret tf_proto_version=5.6 tf_req_id=5f570286-eb84-2890-d7d8-1c61222e105e timestamp=2025-10-23T09:08:51.471Z
2025-10-23T09:08:51.473Z [TRACE] GRPCProvider: GetProviderSchema
2025-10-23T09:08:51.473Z [TRACE] GRPCProvider: returning cached schema: EXTRA_VALUE_AT_END=registry.terraform.io/integrations/github

Panic Output

No panic in output

Code of Conduct

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

Activity

  1. added
    Type: Bug
    Status: Triage
    on Oct 23, 2025
  2. nickfloyd commented on Oct 27, 2025

    @nickfloyd
    Contributor

    Hey @0x46616c6b Looks like we missed a schema migration for this resource so that state get's updated. Let me work up a patch and get it released. Apologies for the trouble.

  3. moved this from Backlog to In Progress in Terraform Provideron Oct 27, 2025
  4. moved this from In Progress to In Review in Terraform Provideron Oct 27, 2025
  5. added a commit that references this issue on Oct 27, 2025
    c9df74c
  6. nickfloyd commented on Oct 27, 2025

    @nickfloyd
    Contributor
  7. evanrappe commented on Oct 27, 2025

    @evanrappe

    I don't see this destroy_on_drift field documented anywhere. Am I missing it?

  8. 11 remaining items

  9. moved this from In Progress to In Review in Terraform Provideron Oct 28, 2025
  10. moved this from Done to In Progress in Terraform Provideron Oct 29, 2025
  11. evanrappe commented on Oct 30, 2025

    @evanrappe

    anyone else still see this issue? I created a test secret on v5.45 and then tried to apply the default value here on v6.7.3 and it errored out

    Terraform will perform the following actions:
    
      # github_actions_organization_secret.EVAN_TEST will be updated in-place
      ~ resource "github_actions_organization_secret" "EVAN_TEST" {
          + destroy_on_drift        = true
            id                      = "EVAN_TEST"
            # (7 unchanged attributes hidden)
        }
    
    Plan: 0 to add, 1 to change, 0 to destroy.
    
    Do you want to perform these actions?
      Terraform will perform the actions described above.
      Only 'yes' will be accepted to approve.
    
      Enter a value: yes
    
    github_actions_organization_secret.EVAN_TEST: Modifying... [id=EVAN_TEST]
    ╷
    │ Error: Provider produced inconsistent result after apply
    │ 
    │ When applying changes to github_actions_organization_secret.EVAN_TEST, provider
    │ "provider[\"registry.terraform.io/integrations/github\"]" produced an unexpected new value: Root
    │ object was present, but now absent.
    │ 
    │ This is a bug in the provider, which should be reported in the provider's own issue tracker.
    
  12. nickfloyd commented on Oct 30, 2025

    @nickfloyd
    Contributor

    anyone else still see this issue? I created a test secret on v5.45 and then tried to apply the default value here on v6.7.3 and it errored out

    Hey @evanrappe sorry you're having some trouble here. So far we've only got confirmation that v6.7.3 is working for others.

    Would you mind posting debug logs so that I can dig in further.

  13. moved this from In Progress to Done in Terraform Provideron Oct 30, 2025
  14. krisalyssa commented on Oct 31, 2025

    @krisalyssa

    @nickfloyd We're seeing the same error message with v6.7.3.

    01K8W9878JE1MAFKMDCK4YBTR3-APPLYING-5.txt

  15. nickfloyd commented on Oct 31, 2025

    @nickfloyd
    Contributor

    @krisalyssa I just went through your log. I feel strongly based on my comments here that this patch will get things sorted for you. Apologies for the trouble, I'm trying to get the patch out there today after I do more testing and validation.

    cc: @evanrappe

  16. nickfloyd commented on Oct 31, 2025

    @nickfloyd
    Contributor

    After a lot of testing, validation, and discussion with @stevehipwell ❤️ I have released v6.7.4 with the fixes for this issue. Please let me know if you run into any issues.

  17. krisalyssa commented on Nov 3, 2025

    @krisalyssa

    @nickfloyd This seems to have resolved our issue. Thanks!

  18. evanrappe commented on Nov 3, 2025

    @evanrappe

    Is it expected that this adding this field (not changing the value) will trigger a resource recreation? Created this secret via v5.45 freshly again, then upgraded the provider to v6.7.5 and this is the resulting plan:

    Terraform will perform the following actions:
    
      # github_actions_organization_secret.EVAN_TEST must be replaced
    -/+ resource "github_actions_organization_secret" "EVAN_TEST" {
          ~ created_at              = "2025-11-03 21:32:57 +0000 UTC" -> (known after apply)
          + destroy_on_drift        = true # forces replacement
          ~ id                      = "EVAN_TEST" -> (known after apply)
          - selected_repository_ids = [] -> null
          ~ updated_at              = "2025-11-03 21:36:37 +0000 UTC" -> (known after apply)
            # (4 unchanged attributes hidden)
        }
    
    Plan: 1 to add, 0 to change, 1 to destroy.
    
  19. evanrappe commented on Nov 13, 2025

    @evanrappe

    @nickfloyd I am still seeing the same behavior I saw on v6.7.3, on v6.8.0.

    Again I created a fresh org secret from fresh TF state on v5.45.0 and attempted to apply the destroy_on_drift default value from v6.8.0 and I get the same error from before:

    Terraform will perform the following actions:
    
      # github_actions_organization_secret.EVAN_TEST will be updated in-place
      ~ resource "github_actions_organization_secret" "EVAN_TEST" {
          + destroy_on_drift        = true
            id                      = "EVAN_TEST"
            # (7 unchanged attributes hidden)
        }
    
    Plan: 0 to add, 1 to change, 0 to destroy.
    
    Do you want to perform these actions?
      Terraform will perform the actions described above.
      Only 'yes' will be accepted to approve.
    
      Enter a value: yes
    
    github_actions_organization_secret.EVAN_TEST: Modifying... [id=EVAN_TEST]
    ╷
    │ Error: Provider produced inconsistent result after apply
    │ 
    │ When applying changes to github_actions_organization_secret.EVAN_TEST, provider
    │ "provider[\"registry.terraform.io/integrations/github\"]" produced an unexpected new
    │ value: Root object was present, but now absent.
    │ 
    │ This is a bug in the provider, which should be reported in the provider's own issue
    │ tracker.
    ╵
    
  20. nickfloyd commented on Nov 13, 2025

    @nickfloyd
    Contributor

    Thanks for reaching back out! This is being discussed here.

  21. added a commit that references this issue on Nov 18, 2025
    e72a4fb
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