Skip to content

[BUG]: Changes in secret values for github_actions_organization_secret should occur in-place #2782

Closed

Description

@jkstpierre

Expected Behavior

When changing the plaintext_value or encrypted_value of an existing github_actions_organization_secret resource, the secret value should be updated in-place as per the GitHub API spec here: https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#create-or-update-an-organization-secret.

Actual Behavior

Terraform detects the github_actions_organization_secret as needing to be replaced and will delete and recreate the secret resource.

Terraform Version

Irrelevant to the bug in question

Affected Resource(s)

  • github_actions_organization_secret

Terraform Configuration Files

Steps to Reproduce

Create an github_actions_organization_secret resource with an initial value on the first apply. Then change the value of the secret stored and generate a plan. Terraform will show in its plan that it intends to replace the secret rather than update it in-place.

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 19, 2025
  2. chancez commented on Jan 6, 2026

    @chancez

    As far as I can tell, this is because the Update callback isn't provided here: https://github.com/integrations/terraform-provider-github/blob/main/github/resource_github_actions_secret.go#L19-L21

    However, as you can see, the create callback is literally using a function resourceGithubActionsSecretCreateOrUpdate which is how the GH REST API works, it creates or updates, so it should just be a matter of adding the Update callback and using resourceGithubActionsSecretCreateOrUpdate (or wrapping it for the update callback signature).

    Perhaps there's a reason it was done like this, but it would be pretty simple to try to fix.

  3. removed
    Status: Triage
    on Jan 15, 2026
  4. moved this from Backlog to In Progress in Terraform Provideron Jan 15, 2026
  5. added this to the v6.11.0 Release milestone on Feb 3, 2026
  6. moved this from In Progress to Done in Terraform Provideron Feb 3, 2026
  7. moved this from 🆕 Triage to ✅ Done in 🧰 Octokit Activeon Feb 3, 2026
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

    Type: Bug

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions