Skip to content

[BUG]: plaintext_value → value rename emits spurious update diff on every existing *OrganizationSecret #3372

Open

Description

@jforest

Module

github_actions_organization_secret, github_dependabot_organization_secret

Version

v6.12.0 (introduced by #3225)

What happened

PR #3225 renamed plaintext_value → value (and encrypted_value → value_encrypted) on the secret resources and deprecated the old property names, but did not add a DiffSuppressFunc to smooth the migration. As a result, every existing resource that was created with plaintext_value in state now shows an ~ update diff after the user renames the argument in their config — even though the secret's actual value is unchanged.

For our Pulumi wrapper (pulumi-github, bridged from this provider), we see 174 ~ update [diff: +value-plaintextValue] entries across 11 stacks, one per *OrganizationSecret resource, after switching the single source-code call site from plaintext_value=... to value=.... Each update issues a GitHub API call that writes the same plaintext secret value back. Idempotent on the GitHub side, but noisy:

  • 174 unnecessary writes to sensitive resources.
  • 174 audit-log entries that look like real secret changes.
  • State-side churn on what should be a pure property rename.

What was expected

A DiffSuppressFunc on the deprecated plaintext_value (and encrypted_value) properties so that when the new value (or value_encrypted) contains the same data, no diff is shown — mirroring the pattern already established for etag properties in #2840.

Reproduction

  1. Create a github_actions_organization_secret (or github_dependabot_organization_secret) with plaintext_value = "foo" under provider v6.11.x.
  2. Upgrade to v6.12.0+.
  3. Rename the argument to value = "foo" (no value change).
  4. Run terraform plan (or pulumi preview) — observe an update entry with a diff of the form +value-plaintextValue (or +value-plaintext_value in TF syntax).

Suggested fix

Add DiffSuppressFunc to the deprecated plaintext_value / encrypted_value schema entries so they diff-suppress against their replacements when the underlying value is unchanged. The etag handling in #2840 is a good template.

Happy to open a PR if that helps — flag if you'd accept one.

Activity

  1. github-actions commented on Apr 24, 2026

    @github-actions

    👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

  2. added
    Type: Bug
    Needs Discussion
    on Apr 25, 2026
  3. added theissue type on Apr 25, 2026
  4. added
    Status: Triage
    on Apr 25, 2026
  5. stevehipwell commented on May 26, 2026

    @stevehipwell
    Collaborator

    @jforest sorry I'm not sure I follow? The PR you referenced added new inputs but didn't make any changes to existing ones other than to mark them as deprecated. There shouldn't be any churn unless you make changes.

  6. Lawstorant commented on Jun 5, 2026

    @Lawstorant

    @stevehipwell it's pretty straightforward really. Even though value is a new property, it's functionally a direct replacement for plaintext_value. These two should internally be the same and exchanging between them in our infra code shouldn't cause any updates to the resources.

    As mentioned by the OP, DiffSuppressFunc should be added so if the data under the new value is the same as it was under plaintext_value, there are no visible changes in the plan. This is how usually providers deal with attribute name changes.

    In my case, this created a plan with hundreds of spurious changes, which ended up not having any value but still took time for my team to go through, to confirm everything is intact as per our policies.

  7. stevehipwell commented on Jun 5, 2026

    @stevehipwell
    Collaborator

    @Lawstorant while we could have implemented logic to suppress the diff, that wasn't the approach we took. The docs are clear that value is different to plaintext_value, and the plan will correctly show a replacement required if you attempt to swap them over. If you want support adding for moving off the deprecated inputs (which still works fine) please open an issue, otherwise deprecation removals will be looked at as part of the v7 planning.

  8. Lawstorant commented on Jun 5, 2026

    @Lawstorant

    So there's actually something happening on the GitHub's side with this change? Not only in terraform state?

  9. stevehipwell commented on Jun 5, 2026

    @stevehipwell
    Collaborator

    So there's actually something happening on the GitHub's side with this change? Not only in terraform state?

    I'm not sure I follow? We added new idiomatic attributes to replace the existing attributes in the next major version. You can use the new attributes when creating a new resource or if you're happy to recreate an existing resource. As part of the pre v7 work we will evaluate all of the deprecations to decide how to handle the switch over.

    FYI all of the work currently taking place on the TF provider is by the community, so decisions are being made based on the available bandwidth.

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

    Needs DiscussionStatus: TriageType: Bugr/actions_organization_secretr/dependabot_organization_secretvNext

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions