Skip to content

Commit

Permalink
feat: add additional github repository options for argocd (#1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
RoseSecurity authored Oct 9, 2024
1 parent fb3fc56 commit c713589
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/argocd-repo/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ resource "github_repository" "default" {

visibility = "private"
vulnerability_alerts = var.vulnerability_alerts_enabled

web_commit_signoff_required = var.web_commit_signoff_required
}

resource "github_branch_default" "default" {
Expand Down Expand Up @@ -87,6 +89,7 @@ resource "github_branch_protection" "default" {
}

restrict_pushes {
blocks_creations = var.restrict_pushes_blocks_creations
push_allowances = var.push_restrictions_enabled ? [
join("", data.github_user.automation_user[*].node_id),
] : []
Expand Down
12 changes: 12 additions & 0 deletions modules/argocd-repo/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ variable "vulnerability_alerts_enabled" {
default = false
}

variable "restrict_pushes_blocks_creations" {
type = bool
description = "Setting this to `false` allows people, teams, or apps to create new branches matching this rule"
default = true
}

variable "slack_notifications_channel" {
type = string
default = ""
Expand Down Expand Up @@ -185,3 +191,9 @@ variable "github_notifications" {
The default value given uses the same notification template names as defined in the `eks/argocd` component. If want to add additional notifications, include any existing notifications from this list that you want to keep in addition.
EOT
}

variable "web_commit_signoff_required" {
type = bool
description = "Require contributors to sign off on web-based commits"
default = false
}

0 comments on commit c713589

Please sign in to comment.