Created
March 5, 2020 17:36
-
-
Save soerenmartius/2d4c540d727eaa31dc099c6361e1d634 to your computer and use it in GitHub Desktop.
How to manage your GitHub Organization with Terraform - Repositories
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locals { | |
# default settings for private repositories | |
private_defaults = { | |
private = true | |
has_issues = true | |
allow_merge_commit = true | |
topics = [ | |
"iac", | |
"terraform", | |
"terraform-modules", | |
] | |
} | |
# default settings for public repositories ( merge with private default settings ) | |
public_defaults = merge(local.private_defaults, { | |
private = false | |
license_template = "apache-2.0" | |
}) | |
default_branch_protections = [ | |
{ | |
branch = "master" | |
enforce_admins = false | |
required_status_checks = { | |
strict = true | |
} | |
required_pull_request_reviews = { | |
dismiss_stale_reviews = true | |
require_code_owner_reviews = true | |
required_approving_review_count = length(module.team_reviewers.team_memberships) | |
dismissal_teams = [module.team_contributors.slug] | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment