feat: add write-only secrets attributes for webhook resources - #3631
Draft
tdyas wants to merge 2 commits into
Draft
feat: add write-only secrets attributes for webhook resources#3631tdyas wants to merge 2 commits into
tdyas wants to merge 2 commits into
Conversation
|
👋 Hi, and thank you for this contribution! This repo is maintained by GitHub and community members on a best-effort basis. We'll get to this as soon as we can. You can help us prioritize by joining the discussion on open issues and PRs, sharing details on the changes you need, and reviewing other contributions. 🤖 This is an automated message. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #3628
Before the change?
github_repository_webhookandgithub_organization_webhookresources currenrly only support asecretattribute to set the webhook's secret. This secret is persisted in Terraform state which is suboptimal from a security perspective.After the change?
secretattribute,github_repository_webhookandgithub_organization_webhooknow support a write-onlysecret_woattribute (and relatedsecret_wo_versionattribute for triggering updates) as per conventions used in other Terraform providers. Terraform's ephemeral resources support can now be used together with the write-onlysecret_woattribute to ensure webhook secrets are never persisted in Terraform state.Pull request checklist
Does this introduce a breaking change?
No. The new
secret_woandsecret_wo_versionfields were added and thesecretfield remains in place and available for use by users. The two schemes are marked as conflicting in the schema so Terraform and logic in this PR should prevent users from trying to use both schemes.Please see our docs on breaking changes to help!