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
[DOCS] Document how to handle Terraform config of vulnerability alerts when repo is archived #3369
│ Error: repository $REDATCTED is archived, please remove the resource from your configuration
│
│ with module.github_repository_vulnerability_alerts.vulnerability_alerts[0],
│ on redacted.tf line 40, in resource "github_repository_vulnerability_alerts" "vulnerability_alerts":
│ 40: resource "github_repository_vulnerability_alerts" "vulnerability_alerts" {
│
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀
changed the title [-][BUG]: github_repository_vulnerability_alerts doesn't play nicely with archived repositories[/-][+][BUG]: Archiving a `github_repository` doesn't cleanup `github_repository_vulnerability_alerts properly[/+]on Apr 24, 2026
That's great, but it's neither explicit nor consistent. github_branch_protection, which would also be obsolete in this circumstance, has no issue co-existing with a github_repository when archived = true.
Could this be a validation error? Can we catch at the plan stage if a github_vulnerability_alerts attempts to have enabled = true when its repository resource has archived = true?
@dotnich-io That's a very reasonable request, yes :)
Could you change the title of the issue to be something like "[DOCS] Document how to handle Terraform config of vulnerability alerts when repo is archived"?
changed the title [-][BUG]: Archiving a `github_repository` doesn't cleanup `github_repository_vulnerability_alerts` properly[/-][+][DOCS] Document how to handle Terraform config of vulnerability alerts when repo is archived[/+]on Jul 5, 2026
Activity
github-actions commentedon Apr 24, 2026
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with
Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀[-][BUG]: github_repository_vulnerability_alerts doesn't play nicely with archived repositories[/-][+][BUG]: Archiving a `github_repository` doesn't cleanup `github_repository_vulnerability_alerts properly[/+][-][BUG]: Archiving a `github_repository` doesn't cleanup `github_repository_vulnerability_alerts properly[/-][+][BUG]: Archiving a `github_repository` doesn't cleanup `github_repository_vulnerability_alerts` properly[/+]dotnich-io commentedon Apr 24, 2026
I did this in response to the deprecation notices introduced by #3038 / #3039.
deiga commentedon Apr 24, 2026
Thanks for raising this. It was an intentional decision that users will have to modify their config if a repo is archived.
Otherwise your config keeps drifting away from the real state of things
dotnich-io commentedon Apr 24, 2026
@deiga thanks for the reply so quickly!
That's great, but it's neither explicit nor consistent.
github_branch_protection, which would also be obsolete in this circumstance, has no issue co-existing with agithub_repositorywhenarchived = true.Could this be a validation error? Can we catch at the plan stage if a
github_vulnerability_alertsattempts to haveenabled = truewhen its repository resource hasarchived = true?deiga commentedon Apr 24, 2026
@dotnich-io Yeah, we know that it's not consistent :/
We're aiming that way!
And it is plan time validation, but Terraform has no way to validate against other resources changes :(
We will be deprecating the
archive = trueproperty in the future, so this will change in that regard 😬dotnich-io commentedon Apr 24, 2026
@deiga roger that. May I request an update to the docs to let future users know how to handle this properly?
deiga commentedon Apr 25, 2026
@dotnich-io That's a very reasonable request, yes :)
Could you change the title of the issue to be something like "[DOCS] Document how to handle Terraform config of vulnerability alerts when repo is archived"?
[-][BUG]: Archiving a `github_repository` doesn't cleanup `github_repository_vulnerability_alerts` properly[/-][+][DOCS] Document how to handle Terraform config of vulnerability alerts when repo is archived[/+]fix: remove vulnerability alerts from state for archived/deleted repos
fix: remove vulnerability alerts from state for archived/deleted repos
fix: replace deprecated vulnerability_alerts arg with dedicated resou…