-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws_codebuild_webhook: Secret not propagated to GHE webhook as in documentation example #4720
Comments
I was afraid this was the case 😅 I was seeing flakey acceptance testing with the Does its value eventually show up after awhile or do we need to forcefully trigger secret rotation? |
Despite what the documentation says, the secret is never returned from the API after the webhook is initially created unless the "rotate-secret" option is set (AWS Support says this is an intentional decision and the docs are out of date.) The two options, I think, are (A) forcefully rotate the secret each time, or (B) get the secret on resource creation and don't let it be overwritten by state refresh or update. Option (B) would require tainting the webhook resource if someone ever manually rotates the secret, but it might be better than option (A) which would modify the values every single time |
The fix for this (setting |
This has been released in version 1.23.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform Version
Terraform Version 0.11.7
Terraform AWS Provider Version 1.21
Affected Resource(s)
Terraform Configuration Files
Debug Output
The following prints on creation. Note that the secret, while "computed" in the
aws_codebuild_webhook
is empty in thegithub_repository_webhook
.Expected Behavior
The Github Enterprise webhook should be created with the "secret" attribute value from the AWS Codebuild webhook.
Actual Behavior
The Github Enterprise webhook "secret" is an empty string.
Steps to Reproduce
terraform apply
/<org>/<repo>/settings/hooks/
and note that no secret is set.References
The
aws_codebuild_webhook
resource was quite recently added.The text was updated successfully, but these errors were encountered: