You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: Changes in secret values for github_actions_organization_secret should occur in-place #2782
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
Reacted by Carlos Angulo Mascarell, Brian DeGregorio and Joe St. Pierre
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.
Activity
chancez commentedon Jan 6, 2026
As far as I can tell, this is because the
Updatecallback isn't provided here: https://github.com/integrations/terraform-provider-github/blob/main/github/resource_github_actions_secret.go#L19-L21However, as you can see, the create callback is literally using a function
resourceGithubActionsSecretCreateOrUpdatewhich is how the GH REST API works, it creates or updates, so it should just be a matter of adding theUpdatecallback and usingresourceGithubActionsSecretCreateOrUpdate(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.