Repository navigation
Closed
Labels
Description
Terraform Version
Terraform v0.12.24
Affected Resource(s)
github_branch_protection
Terraform Configuration Files
resource "github_repository" "test" {
name = "tf-acc-test-%s"
auto_init = true
}
data "github_user" "test" {
username = "%s"
}
resource "github_team" "test" {
name = "tf-acc-test-%[1]s"
}
resource "github_branch_protection" "test" {
repository = github_repository.test.name
branch = "main"
restrictions {
users = [data.github_user.test.login]
teams = [github_team.test.slug]
apps = []
}
}Debug Output
When using actorIDs of mixed type, only the first node is configured. No errors are reported.
{
"query": "mutation($input:CreateBranchProtectionRuleInput!){createBranchProtectionRule(input: $input){branchProtectionRule{id}}}",
"variables": {
"input": {
"repositoryId": "MDEwOlJlcG9zaXRvcnkzMDg3NTgzODc=",
"pattern": "main",
"requiresApprovingReviews": false,
"requiredApprovingReviewCount": 0,
"requiresCommitSignatures": false,
"isAdminEnforced": false,
"requiresStatusChecks": false,
"requiresStrictStatusChecks": false,
"requiresCodeOwnerReviews": false,
"dismissesStaleReviews": false,
"restrictsReviewDismissals": false,
"reviewDismissalActorIds": null,
"restrictsPushes": true,
"pushActorIds": [
"MDQ6VGVhbTQyMjgxNTI=",
"MDQ6VGVhbTQyMjgxNTM="
],
"requiredStatusCheckContexts": null
}
}
}example request ID: 0400:6BD5:FB26C4:1A4FEA7:5F9C95E0 (two team nodes)
example request ID: 06C0:230F:4CBFE3:7E7B89:5F9C9051 (user node, team node)
Panic Output
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.
Expected Behavior
All actors associated to a branch protection rule.
Actual Behavior
All actors of a single type associated to a branch protection rule.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
References
A list of User, Team or App IDs allowed to push to matching branches.
Reacted by Loren Gordon
Activity
guillermotti commentedon Nov 19, 2020
This is already working with 4.0.1
patrickmarabeas commentedon Nov 28, 2020
This should be resolved in: https://github.com/terraform-providers/terraform-provider-github/pull/615