u/jch254

GitHub repo rename caused silent webhook drift in Terraform (CodeBuild stopped triggering)
▲ 0 r/Terraform+1 crossposts

GitHub repo rename caused silent webhook drift in Terraform (CodeBuild stopped triggering)

Hit a subtle issue where CodeBuild completely stopped triggering after renaming a GitHub repo.

Pushes worked fine. No errors. No failed builds. Just… nothing happening.

Turns out GitHub deletes the webhook during a repo rename. Terraform still thinks the webhook resource exists under the old repo name, so it doesn’t recreate it.

Result:
No webhook → no trigger → no builds

Took a while to track down because there’s no failure signal, just absence.

Fix was:

  • Update the repo URL in the CodeBuild source
  • Force recreate the webhook (terraform destroy -target=aws_codebuild_webhook.main then apply)

Wrote up the full breakdown and why this happens:
https://jch254.com/blog/renaming-github-repo-breaks-codebuild/

jch254.com
u/jch254 — 20 hours ago