diff --git a/terraform/production/org.tfvars b/terraform/production/org.tfvars index a3b595d..b567bda 100644 --- a/terraform/production/org.tfvars +++ b/terraform/production/org.tfvars @@ -41,10 +41,6 @@ organization_teams = { "matthiask" ] permission = "push" - - repositories = [ - "django-commons-playground", - ] } } diff --git a/terraform/resources-org.tf b/terraform/resources-org.tf index 47babb5..4367822 100644 --- a/terraform/resources-org.tf +++ b/terraform/resources-org.tf @@ -32,19 +32,16 @@ resource "github_team_members" "org_team_members" { for_each = each.value.members content { - # members here references the dynamic name, not the looped entity. username = members.value role = "member" } } - # Maintainer here means the maintainer role for the team. - # It's not a maintainer of the repo. + # Maintainer here means the maintainer role for the team. It's not a maintainer of the repo. dynamic "members" { for_each = each.value.maintainers content { - # members here references the dynamic name, not the looped entity. username = members.value role = "maintainer" } diff --git a/terraform/resources-repos.tf b/terraform/resources-repos.tf index 857e6f3..35b8c65 100644 --- a/terraform/resources-repos.tf +++ b/terraform/resources-repos.tf @@ -2,10 +2,6 @@ # https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository resource "github_repository" "this" { - - # Ensure GitHub repository is Private - # checkov:skip=CKV_GIT_1: Public is ok for us since we are an open source project - for_each = var.repositories allow_auto_merge = each.value.allow_auto_merge @@ -62,7 +58,7 @@ resource "github_repository" "this" { # required_pull_request_reviews { # dismiss_stale_reviews = true # require_code_owner_reviews = true -# required_approving_review_count = 1 +# required_approving_review_count = github_repository.this[each.key].required_approving_review_count # } # # required_status_checks { diff --git a/terraform/variables.tf b/terraform/variables.tf index 188d7a9..62ede07 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -28,12 +28,12 @@ variable "repositories" { allow_squash_merge = optional(bool, true) allow_update_branch = optional(bool, true) delete_branch_on_merge = optional(bool, true) - enable_branch_protection = optional(bool, true) has_discussions = optional(bool, true) has_downloads = optional(bool, true) has_wiki = optional(bool, false) is_template = optional(bool, false) push_allowances = optional(list(string), []) + enable_branch_protection = optional(bool, true) required_status_checks_contexts = optional(list(string), []) template = optional(string) topics = optional(list(string)) @@ -60,7 +60,6 @@ variable "organization_teams" { members = optional(set(string), []) permission = optional(string, null) privacy = optional(string, "closed") - repositories = optional(set(string), []) review_request_delegation = optional(bool, false) })) }