Skip to content

[BUG]: v6.7.4 causes Internal validation error during TF Init #2855

Closed

Description

Expected Behavior

I would expect TF that was working prior to the v6.7.0 release would resume working after the v6.7.4 fix.

v6.7.0, v6.7.1, v6.7.2, and v6.7.3 gave us errors at the end of the apply but unfortunately v6.7.4 is giving us errors at the beginning of the plan.

Actual Behavior

Error: InternalValidate

  with provider["registry.terraform.io/integrations/github"].xxx

Internal validation of the provider failed! This is always a bug
with the provider itself, and not a user issue. Please report
this bug:

resource github_actions_organization_secret: All fields are ForceNew or
Computed w/out Optional, Update is superfluous
resource github_actions_secret: All fields are ForceNew or Computed w/out
Optional, Update is superfluous

Error: InternalValidate

  with provider["registry.terraform.io/integrations/github"].xxx,
  on main.tf line 44, in provider "github":
  44: provider "github" {

Internal validation of the provider failed! This is always a bug
with the provider itself, and not a user issue. Please report
this bug:

resource github_actions_organization_secret: All fields are ForceNew or
Computed w/out Optional, Update is superfluous
resource github_actions_secret: All fields are ForceNew or Computed w/out
Optional, Update is superfluous

Module versions in this stack

  - Using olivr/gpg v0.2.1 from the shared cache directory
  - Using mastercard/restapi v2.0.1 from the shared cache directory
  - Using tchupp/env v0.0.2 from the shared cache directory
  - Using hashicorp/aws v5.6.2 from the shared cache directory
  - Using integrations/github v6.7.4 from the shared cache directory <---- integrations/github v6.7.4
  - Using hashicorp/tls v4.1.0 from the shared cache directory
  - Using datadog/datadog v3.78.0 from the shared cache directory

Terraform Version

Terraform v1.13.4
on linux_amd64

Affected Resource(s)

  • github_actions_organization_secret

Terraform Configuration Files

I'm sorry, I can't share this publicly but I can share privately if there's a way to accomplish this.

Steps to Reproduce

No response

Debug Output

Panic Output

Code of Conduct

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

Activity

  1. added
    Type: Bug
    Status: Triage
    on Oct 31, 2025
  2. zepeng811 commented on Oct 31, 2025

    @zepeng811
    Contributor

    experiencing the same issue and also posted in #2839 (comment)

    reverting to v6.7.0 works.

  3. AndrewUnderwoodAtFanatics commented on Oct 31, 2025

    @AndrewUnderwoodAtFanatics
    Author

    Unfortunately when trying to revert to v6.7.0 I get a whole bunch of state errors for resources that have already been upgraded.

    Error: Resource instance managed by newer provider version
    The current state of
    module.infrastructure.github_actions_secret.xxxxxx[0]
    was created by a newer provider version than is currently selected. Upgrade
    the github provider to work with this state.
    
  4. scrthq commented on Oct 31, 2025

    @scrthq

    @AndrewUnderwoodAtFanatics Looks like going 1 version back to 6.7.3 works as well, currently sanity testing on my end. Will confirm shortly.

  5. AndrewUnderwoodAtFanatics commented on Oct 31, 2025

    @AndrewUnderwoodAtFanatics
    Author

    Reverting to 6.7.3 is an improvement but still results in the previous issues with that release that have been reported. At the end of the apply phase we get failures one all github_actions_secret resources.

    │ When applying changes to
    │ module.infrastructure.github_actions_secret.AAAA[0],
    │ 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.
    ╵
    ╷
    │ Error: Provider produced inconsistent result after apply
    │ 
    │ When applying changes to
    │ module.infrastructure.github_actions_secret.BBBB[0],
    │ 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.
    
  6. nickfloyd commented on Nov 1, 2025

    @nickfloyd
    Contributor

    Thank you for the info @AndrewUnderwoodAtFanatics - I now realized that I pushed the fix without removing the now useless update func. This is the diff that I'll cut a new release for:

    Validated by:

    git checkout v6.7.4
    go build -o terraform-provider-github
    terraform init && terraform validate
    

    Errored with the update validation failure

    git checkout v6.7.5-patch
    go build -o terraform-provider-github
    terraform init && terraform validate
    

    No validation errors

    v6.7.4...v6.7.5-patch

  7. moved this from Backlog to In Progress in Terraform Provideron Nov 1, 2025
  8. moved this from In Progress to In Review in Terraform Provideron Nov 1, 2025
  9. nickfloyd commented on Nov 1, 2025

    @nickfloyd
    Contributor

    https://github.com/integrations/terraform-provider-github/releases/tag/v6.7.5

    I've also realized that there is a hole in our CI testing - I'll be adding the running of terraform configuration validation to our PR CI loop - #2856

    Apologies for the trouble and thank you for the quick response on getting logs and the details of this issue.

  10. AndrewUnderwoodAtFanatics commented on Nov 1, 2025

    @AndrewUnderwoodAtFanatics
    Author

    Thanks for the quick turnaround on v6.7.5.

    I can confirm this does resolve the internal validation errors from v6.7.4.

    A new behavior I'm seeing on v6.7.5 is a number of github_actions_secret resources that have had no recent changes are showing the need to be force replaced. This should be safe since they will be overwritten with the same values they already hold, but it's noteworthy. The apply completed successfully.

      # module.infrastructure.github_actions_secret.xxxxxx[0] must be replaced
    -/+ resource "github_actions_secret" "xxxxxxx" {
          ~ created_at       = "2024-09-06 20:00:30 +0000 UTC" -> (known after apply)
          + destroy_on_drift = true # forces replacement
          ~ id               = "***************************************************" -> (known after apply)
          + plaintext_value  = (sensitive value) # forces replacement
          ~ updated_at       = "2025-10-31 23:48:21 +0000 UTC" -> (known after apply)
            # (3 unchanged attributes hidden)
        }
    
      # module.infrastructure.github_actions_secret.yyyyyy[0] must be replaced
    -/+ resource "github_actions_secret" "yyyyyyyyy" {
          ~ created_at       = "2023-12-13 20:42:34 +0000 UTC" -> (known after apply)
          + destroy_on_drift = true # forces replacement
          ~ id               = "********************************" -> (known after apply)
          + plaintext_value  = (sensitive value) # forces replacement
          ~ updated_at       = "2025-10-31 23:48:20 +0000 UTC" -> (known after apply)
            # (3 unchanged attributes hidden)
        }
    
    

    To doublecheck I ran the plan a second time and as you would hope, there are no outstanding changes.

    No changes. Your infrastructure matches the configuration.
    Terraform has compared your real infrastructure against your configuration
    and found no differences, so no changes are needed.
    
  11. tnm commented on Nov 1, 2025

    @tnm

    This first fix here broke all our stuff; the second is better I think, but this is all rough.

    I forked off a couple months ago (https://github.com/cased/terraform-provider-github/).

    I think we should re-write from scratch? Happy to help here.

  12. nickfloyd commented on Nov 12, 2025

    @nickfloyd
    Contributor

    @tnm I completely agree and apologies for the trouble. Trying to reactivate development on this after it was dormant for about a year has brought about some challenges for sure. I'd love to revision this using the Terraform plugin architecture. At the moment we're working to try and unblock folks so that we might have runway to do just that.

    I'd recommend we use this to track things and discuss.

  13. iangelov commented on Nov 12, 2025

    @iangelov

    It was definitely a bit frustrating, but I'm sure we all appreciate your effort - this provider has been needing some love for a while. Thank you!

  14. nickfloyd commented on Nov 20, 2025

    @nickfloyd
    Contributor

    @AndrewUnderwoodAtFanatics et. al. Please let me know if you're good with me closing this out now that the issue has been addressed.

  15. moved this from In Review to BLOCKED in Terraform Provideron Nov 20, 2025
  16. moved this from BLOCKED to In Review in Terraform Provideron Nov 25, 2025
  17. nickfloyd commented on Nov 25, 2025

    @nickfloyd
    Contributor

    Closing this issue as complete. Please either create a new issue or @ me if you think that this should remain open.

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions