-
Notifications
You must be signed in to change notification settings - Fork 948
github_branch_protection is not creating restriction if only a single team is provided. #269
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
Status: StaleUsed by stalebot to clean houseUsed by stalebot to clean houseStatus: Up for grabsIssues that are ready to be worked on by anyoneIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documentedSomething isn't working as documentedr/branch_protection
Description
Terraform Version
Terraform v0.12.3
- provider.github v2.2.0
Affected Resource(s)
- github_branch_protection
Terraform Configuration Files
locals {
teams = ["admin"]
}
resource "github_repository" "repo" {
name = var.name
description = var.description
private = true
auto_init = false
has_downloads = false
has_issues = false
has_projects = false
has_wiki = false
}
resource "github_branch_protection" "master_branch" {
repository = github_repository.repo.name
branch = "master"
enforce_admins = true
required_pull_request_reviews {
dismiss_stale_reviews = true
required_approving_review_count = 1
}
restrictions {
teams = local.teams
}
}Expected Behavior
GitHub Branch should show the admin team in "Restrict who can push to matching branches" session.
Actual Behavior
No team is displayed in the "Restrict who can push to matching branches" session.
Steps to Reproduce
terraform planterraform apply
Important Factoids
I'm running using remote runners from TFE.
If I run with more than one team the team is properly associate in the "Restrict who can push to matching branches" session".
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: StaleUsed by stalebot to clean houseUsed by stalebot to clean houseStatus: Up for grabsIssues that are ready to be worked on by anyoneIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documentedSomething isn't working as documentedr/branch_protection