Skip to content

Commit

Permalink
Use repository name as the repository_id for branch protection
Browse files Browse the repository at this point in the history
This resolves issue caused by moving to use the v4 API for this resouce, as part of provider version: 3.1.0

Issue: integrations/terraform-provider-github#908
Provider bump: integrations/terraform-provider-github#337

Signed-off-by: Stefan Wessels Beljaars <swesselsbeljaars@schubergphilis.com>
  • Loading branch information
stefanwb committed Sep 24, 2021
1 parent 699a152 commit 81c133f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ resource "github_branch_protection" "default" {
enforce_admins = local.protection[count.index].enforce_admins
pattern = local.protection[count.index].branch
push_restrictions = local.protection[count.index].push_restrictions
repository_id = github_repository.default.node_id
repository_id = github_repository.default.name

dynamic "required_pull_request_reviews" {
for_each = local.protection[count.index].required_reviews != null ? { create : true } : {}
Expand Down

0 comments on commit 81c133f

Please sign in to comment.