Repository navigation
Description
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
- Create a
github_actions_organization_secret(orgithub_dependabot_organization_secret) withplaintext_value = "foo"under provider v6.11.x. - Upgrade to v6.12.0+.
- Rename the argument to
value = "foo"(no value change). - Run
terraform plan(orpulumi preview) — observe anupdateentry with a diff of the form+value-plaintextValue(or+value-plaintext_valuein 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
github-actions commentedon Apr 24, 2026
👋 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! 🚀stevehipwell commentedon May 26, 2026
@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.
Lawstorant commentedon Jun 5, 2026
@stevehipwell it's pretty straightforward really. Even though
valueis a new property, it's functionally a direct replacement forplaintext_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,
DiffSuppressFuncshould be added so if the data under the newvalueis the same as it was underplaintext_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.
stevehipwell commentedon Jun 5, 2026
@Lawstorant while we could have implemented logic to suppress the diff, that wasn't the approach we took. The docs are clear that
valueis different toplaintext_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.Lawstorant commentedon Jun 5, 2026
So there's actually something happening on the GitHub's side with this change? Not only in terraform state?
stevehipwell commentedon Jun 5, 2026
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.