Skip to content

Commit 3b3fe59

Browse files
authored
feat: add additional github repository options for argocd (cloudposse/terraform-aws-components#1143)
1 parent 91a6f43 commit 3b3fe59

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ resource "github_repository" "default" {
5151

5252
visibility = "private"
5353
vulnerability_alerts = var.vulnerability_alerts_enabled
54+
55+
web_commit_signoff_required = var.web_commit_signoff_required
5456
}
5557

5658
resource "github_branch_default" "default" {
@@ -87,6 +89,7 @@ resource "github_branch_protection" "default" {
8789
}
8890

8991
restrict_pushes {
92+
blocks_creations = var.restrict_pushes_blocks_creations
9093
push_allowances = var.push_restrictions_enabled ? [
9194
join("", data.github_user.automation_user[*].node_id),
9295
] : []

src/variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ variable "vulnerability_alerts_enabled" {
157157
default = false
158158
}
159159

160+
variable "restrict_pushes_blocks_creations" {
161+
type = bool
162+
description = "Setting this to `false` allows people, teams, or apps to create new branches matching this rule"
163+
default = true
164+
}
165+
160166
variable "slack_notifications_channel" {
161167
type = string
162168
default = ""
@@ -185,3 +191,9 @@ variable "github_notifications" {
185191
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.
186192
EOT
187193
}
194+
195+
variable "web_commit_signoff_required" {
196+
type = bool
197+
description = "Require contributors to sign off on web-based commits"
198+
default = false
199+
}

0 commit comments

Comments
 (0)