From 81c133f7df3faad8bc677d4e62a1b876d9877cf9 Mon Sep 17 00:00:00 2001 From: Stefan Wessels Beljaars Date: Fri, 24 Sep 2021 15:31:23 +0200 Subject: [PATCH] Use repository name as the repository_id for branch protection This resolves issue caused by moving to use the v4 API for this resouce, as part of provider version: 3.1.0 Issue: https://github.com/integrations/terraform-provider-github/issues/908 Provider bump: https://github.com/integrations/terraform-provider-github/pull/337 Signed-off-by: Stefan Wessels Beljaars --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index c219b95..0e36c37 100644 --- a/main.tf +++ b/main.tf @@ -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 } : {}