You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Here is where the main parts of the module go, including resource definitionsresource"github_repository""repo" {
name="${var.name}"description="${var.description}"private="${var.private}"has_issues=falsehas_wiki=falsehas_downloads=falseauto_init=true
}
resource"github_branch_protection""repo_master" {
repository="${github_repository.repo.name}"branch="master"required_status_checks {
include_admins="${var.restrict_admins}"strict=true
}
required_pull_request_reviews {
include_admins="${var.restrict_admins}"
}
}
resource"github_team_repository""members" {
count="${length(var.members)}"team_id="${element(var.members, count.index)}"role="push"
}
resource"github_team_repository""admins" {
count="${length(var.admins)}"team_id="${element(var.admins, count.index)}"role="admin"
}
This was just fixed in #26, and should be available in the next release of the GitHub provider if you're using 0.10 already. If you wish to stick with 0.9.x, you'll need to compile the provider and place the resulting binary in the same location of your Terraform binary, or specify a location in your global terraformrc file.
Terraform Version
0.9.8
Affected Resource(s)
github_branch_protection
Terraform Configuration Files
Debug Output
https://gist.github.com/DWSR/c9a1a1c6eb4132b9d667764f01944fef#file-terraform-log
Panic Output
N/A
Expected Behavior
Terraform should apply a branch protection to the master branch
Actual Behavior
https://gist.github.com/DWSR/c9a1a1c6eb4132b9d667764f01944fef#file-error-txt
Steps to Reproduce
terraform apply
References
The request body doesn't seem to line up with the required contents, per https://developer.github.com/v3/repos/branches/#update-branch-protection
The text was updated successfully, but these errors were encountered: