From bf2ca4d56f3a9b5bd369d757f8fc63598274e53a Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 3 Jan 2023 17:52:31 -0800 Subject: ref: delete terraform configuration for GitHub I'm not using GitHub for my repositories, and I don't need to maintain this configuration either. --- ops/github/repositories.tf | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 ops/github/repositories.tf (limited to 'ops/github/repositories.tf') diff --git a/ops/github/repositories.tf b/ops/github/repositories.tf deleted file mode 100644 index 38e5de2..0000000 --- a/ops/github/repositories.tf +++ /dev/null @@ -1,36 +0,0 @@ -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 = try(each.value.archived, false) - 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 = true - allow_squash_merge = false - 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 - for_each = { - for k, v in local.repositories : try(v.name, k) => v - if try(v.archived, false) == false - } - - repository = each.key - branch = try(each.value.default_branch, "main") -} -- cgit v1.2.3