Skip to content

Commit

Permalink
fix: alerts and protections disabled upon archival
Browse files Browse the repository at this point in the history
Signed-off-by: James Ramirez <james.ramirez@grendel-consulting.com>
  • Loading branch information
ramirezj committed Jan 12, 2025
1 parent f4f606d commit ff14ba7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/repository/repository.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resource "github_repository" "this" {
delete_branch_on_merge = true
has_discussions = var.discussions
has_issues = true
vulnerability_alerts = true
vulnerability_alerts = var.archived == true ? false : true

dynamic "security_and_analysis" {
for_each = var.visibility == "public" ? [{}] : []
Expand All @@ -21,7 +21,7 @@ resource "github_repository" "this" {
}

secret_scanning_push_protection {
status = "enabled"
status = var.archived == true ? "disabled" : "enabled"
}
}
}
Expand Down

0 comments on commit ff14ba7

Please sign in to comment.