Skip to content

Commit

Permalink
Merge pull request #219 from libp2p/master-upgrade
Browse files Browse the repository at this point in the history
upgrade@8307009515
  • Loading branch information
galargh authored Mar 16, 2024
2 parents 5d334c2 + bcd75a7 commit 7a55e8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions terraform/resources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ resource "github_branch_protection" "this" {

pattern = each.value.pattern

repository_id = coalesce(try(each.value.repository_id, null), github_repository.this[lower(each.value.repository)].node_id)
repository_id = github_repository.this[split(":", each.key)[0]].node_id

allows_deletions = try(each.value.allows_deletions, null)
allows_force_pushes = try(each.value.allows_force_pushes, null)
Expand Down Expand Up @@ -169,7 +169,7 @@ resource "github_team_repository" "this" {
repository = each.value.repository
permission = each.value.permission

team_id = coalesce(try(each.value.team_id, null), github_team.this[lower(each.value.team)].id)
team_id = github_team.this[split(":", each.key)[0]].id

lifecycle {
ignore_changes = []
Expand All @@ -182,7 +182,7 @@ resource "github_team_membership" "this" {
username = each.value.username
role = each.value.role

team_id = coalesce(try(each.value.team_id, null), github_team.this[lower(each.value.team)].id)
team_id = github_team.this[split(":", each.key)[0]].id

lifecycle {
ignore_changes = []
Expand All @@ -197,7 +197,7 @@ resource "github_repository_file" "this" {
content = each.value.content
# Since 5.25.0 the branch attribute defaults to the default branch of the repository
# branch = try(each.value.branch, null)
branch = coalesce(try(each.value.branch, null), github_repository.this[each.value.repository].default_branch)
branch = github_repository.this[each.value.repository].default_branch
overwrite_on_create = try(each.value.overwrite_on_create, true)
# Keep the defaults from 4.x
commit_author = try(each.value.commit_author, "GitHub")
Expand Down

0 comments on commit 7a55e8d

Please sign in to comment.