Skip to content

Commit

Permalink
Add dependencies for branch and branch protection resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Arnold committed Feb 19, 2025
1 parent 29b7b1b commit e03740b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions github_branch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ resource "github_branch" "branch" {
count = var.github_default_branch == "main" ? 0 : 1
repository = local.github_repo.name
branch = var.github_default_branch
depends_on = [
github_repository.repo
]
}


Expand Down Expand Up @@ -69,4 +72,8 @@ resource "github_branch_protection" "main" {
required_status_checks[0].contexts
]
}

depends_on = [
github_branch_default.default_main_branch
]
}

0 comments on commit e03740b

Please sign in to comment.