aboutsummaryrefslogtreecommitdiff
path: root/ops/github/repositories.tf
blob: 506f0dd9eb5a73f755eba379e04bc1727f2608b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
locals {
  repositories = yamldecode(file("repositories.yaml"))
}

resource "github_repository" "repos" {
  for_each = local.repositories

  name                   = try(each.value.name, each.key)
  visibility             = each.value.visibility
  archived               = each.value.archived
  description            = try(each.value.description, null)
  has_downloads          = false
  has_issues             = try(each.value.has_issues, true)
  has_projects           = false
  has_wiki               = false
  allow_merge_commit     = false
  allow_squash_merge     = true
  allow_rebase_merge     = true
  vulnerability_alerts   = try(each.value.vulnerability_alerts, false)
  delete_branch_on_merge = try(each.value.vulnerability_alerts, false)
}