[BUG]: `plaintext_value` → `value` rename emits spurious update diff on every existing *OrganizationSecret
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- go, terraform
- Domain
- devops, infrastructure
Research direction
Start at the schemas for github_actions_organization_secret and github_dependabot_organization_secret, focusing on the deprecated plaintext_value and encrypted_value entries. Compare the etag diff-suppression pattern from #2840 and reproduce the rename with terraform plan or pulumi preview. Done means renaming the arguments no longer shows a diff or triggers an unnecessary secret update when the value is unchanged.
Written by the indexing model from the issue text.
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.
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 1k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from integrations/terraform-provider-github
-
github_organization_custom_properties Read doesn't handle 404, breaking recovery after deletion Openr/organization_custom_properties Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
integrations/terraform-provider-github#3641 · 1 comment ·
-
Status: Triage Type: Feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
integrations/terraform-provider-github#3613 · 1 comment · 3 reactions ·
-
r/repository_environment Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
integrations/terraform-provider-github#3609 · 3 comments · 1 reaction ·
-
github_repository Read doesn't refresh id/name after an out-of-band rename (unlike Create/Update) Openr/repository Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
integrations/terraform-provider-github#3592 · 2 comments ·
-
r/issue_label Status: Invalid/Incomplete Status: Triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
integrations/terraform-provider-github#3559 · 10 comments ·
All issues in integrations/terraform-provider-github
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·