-
Notifications
You must be signed in to change notification settings - Fork 948
Branch protection not updating #617
Copy link
Copy link
Closed as not planned
Labels
Status: StaleUsed by stalebot to clean houseUsed by stalebot to clean houseType: BugSomething isn't working as documentedSomething isn't working as documentedr/branch_protection
Description
Terraform Version
Terraform v0.13.5
provider registry.terraform.io/hashicorp/github v4.1.0
Affected Resource(s)
Please list the resources as a list, for example:
- github_branch_protection
Terraform Configuration Files
provider "github" {
token = var.github_token
organization = "MyOrg"
version = "~> 4.1.0"
}
...
resource "github_branch_protection" "develop_protection" {
repository_id = github_repository.repo.node_id
pattern = "develop"
enforce_admins = true
required_status_checks {
strict = true
}
required_pull_request_reviews {
dismiss_stale_reviews = true
}
push_restrictions = [data.github_team.1.node_id, data.github_team.2.node_id]
}Expected Behavior
The branch protection for develop should have been updated to have push restrictions to the teams identified as well as have status checks set.
Actual Behavior
No push restrictions were added and no status checks are required but they were identified to at least have been attempted and were marked as successfully updated.
# github_branch_protection.develop_protection will be updated in-place
~ resource "github_branch_protection" "develop_protection" {
enforce_admins = true
id = "id="
pattern = "develop"
~ push_restrictions = [
+ "id1=",
+ "id2=",
]
repository_id = "id="
require_signed_commits = false
required_pull_request_reviews {
dismiss_stale_reviews = true
dismissal_restrictions = []
require_code_owner_reviews = false
required_approving_review_count = 1
}
+ required_status_checks {
+ strict = true
}
}
Steps to Reproduce
terraform apply
Important Factoids
Nothing in particular
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: StaleUsed by stalebot to clean houseUsed by stalebot to clean houseType: BugSomething isn't working as documentedSomething isn't working as documentedr/branch_protection