about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ops/github/repositories.tf2
1 files changed, 2 insertions, 0 deletions
diff --git a/ops/github/repositories.tf b/ops/github/repositories.tf
index ba5cf60..38e5de2 100644
--- a/ops/github/repositories.tf
+++ b/ops/github/repositories.tf
@@ -18,9 +18,11 @@ resource "github_repository" "repos" {
   allow_rebase_merge     = false
   vulnerability_alerts   = try(each.value.vulnerability_alerts, false)
   delete_branch_on_merge = try(!each.value.archived, true)
+  auto_init              = true
 }
 
 resource "github_branch_default" "main" {
+  depends_on = [github_repository.repos]
   # no need to set the default branch if the repository is already
   # archived.
   # use the name for the repository if set