Skip to content

Commit

Permalink
fix: ignore vulnerability_alerts on GHE 3.x (endpoint returns 404)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnol377 committed Apr 7, 2026
1 parent 7ca9562 commit d7d39cb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions github_repo.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ locals {
# Safe access to repo and existing resources
github_repo = var.create_repo && length(github_repository.repo) > 0 ? github_repository.repo[0] : (
!var.create_repo ? data.github_repository.existing[0] : null
! var.create_repo ? data.github_repository.existing[0] : null
)
validate_merge_options = (
Expand Down Expand Up @@ -90,7 +90,11 @@ resource "github_repository" "repo" {
lifecycle {
ignore_changes = [
auto_init,
template
template,
# vulnerability_alerts endpoint returns 404 on GitHub Enterprise Server 3.x
# (the Dependabot alerts API is not supported on this GHE version).
# Ignoring prevents terraform apply from failing with 404 on every run.
vulnerability_alerts,
]
}
}

0 comments on commit d7d39cb

Please sign in to comment.