Last active
March 29, 2020 17:23
-
-
Save soerenmartius/2818055c92ad50e4ad48e28150954132 to your computer and use it in GitHub Desktop.
GitHub Repository with Branch Protection Rule
This file contains 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
module "iac-github" { | |
source = "mineiros-io/repository/github" | |
version = "~> 0.1.0" | |
name = "iac-github" | |
private = true | |
description = "An example on how to manage a GitHub organization with Terraform." | |
allow_merge_commit = true | |
gitignore_template = "Terraform" | |
license_template = "mit" | |
auto_init = true | |
branch_protections = [ | |
{ | |
branch = "master" | |
enforce_admins = false | |
required_status_checks = { | |
strict = true | |
contexts = ["ci/semaphoreci/push: IaC-GitHub CI Pipeline"] | |
} | |
required_pull_request_reviews = { | |
dismiss_stale_reviews = true | |
require_code_owner_reviews = true | |
required_approving_review_count = 1 | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment