about summary refs log tree commit diff
path: root/ops/github
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ops/github/repositories.tf21
-rw-r--r--ops/github/repositories.yaml104
-rw-r--r--ops/github/repositories_private.tf288
-rw-r--r--ops/github/repositories_public.tf85
4 files changed, 125 insertions, 373 deletions
diff --git a/ops/github/repositories.tf b/ops/github/repositories.tf
new file mode 100644
index 0000000..506f0dd
--- /dev/null
+++ b/ops/github/repositories.tf
@@ -0,0 +1,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)
+}
diff --git a/ops/github/repositories.yaml b/ops/github/repositories.yaml
new file mode 100644
index 0000000..c32820c
--- /dev/null
+++ b/ops/github/repositories.yaml
@@ -0,0 +1,104 @@
+ballet:
+  visibility: private
+  archived: true
+cpan-graph:
+  visibility: private
+  archived: true
+demorest:
+  visibility: private
+  archived: true
+devbox:
+  visibility: private
+  archived: true
+emacsd:
+  name: emacs.d
+  visibility: private
+  archived: false
+  vulnerability_alerts: true
+feeddiscovery:
+  visibility: private
+  archived: true
+graph-gexf:
+  visibility: private
+  archived: true
+kiokudb-backend-memcachedb:
+  visibility: private
+  archived: true
+kiokudb-backend-riak:
+  visibility: private
+  archived: true
+lwpx-paranoidagent:
+  visibility: private
+  archived: true
+moosex-abstractfactory:
+  visibility: private
+  archived: true
+moosex-methodprivate:
+  visibility: private
+  archived: true
+moosex-privacy:
+  visibility: private
+  archived: true
+moosex-useragent:
+  visibility: private
+  archived: true
+notebooks:
+  visibility: private
+  archived: true
+password-store:
+  visibility: private
+  archived: false
+  has_issues: false
+world:
+  visibility: private
+  archived: false
+  description: nix configurations for my machines
+  vulnerability_alerts: true
+  delete_branch_on_merge: true
+gh-ssh-keys:
+  visibility: private
+  archived: false
+  vulnerability_alerts: true
+  delete_branch_on_merge: true
+fcuny-net:
+  name: fcuny.net
+  visibility: private
+  archived: false
+  vulnerability_alerts: true
+  delete_branch_on_merge: true
+notes-fcuny-net:
+  name: notes.fcuny.net
+  visibility: private
+  archived: false
+  vulnerability_alerts: true
+  delete_branch_on_merge: true
+govanity:
+  visibility: private
+  archived: false
+  vulnerability_alerts: true
+  delete_branch_on_merge: true
+twitter-backup:
+  visibility: private
+  archived: false
+  vulnerability_alerts: true
+  delete_branch_on_merge: true
+jitterbug:
+  archived: true
+  visibility: public
+  description: "Cross Language Continuous Integration for Git"
+presque:
+  archived: true
+  visibility: public
+  description: "a simple redis/tatsumaki message queue"
+webservice-google-suggest:
+  archived: true
+  visibility: public
+  description: "WebService::Google::Suggest allows you to use Google Suggest as a Web Service API to retrieve completions to your search query or partial query"
+anyevent-riak:
+  archived: true
+  visibility: private
+containerd-to-vm:
+  archived: false
+  visibility: public
+  vulnerability_alerts: true
+  delete_branch_on_merge: true
diff --git a/ops/github/repositories_private.tf b/ops/github/repositories_private.tf
deleted file mode 100644
index e78bf32..0000000
--- a/ops/github/repositories_private.tf
+++ /dev/null
@@ -1,288 +0,0 @@
-resource "github_repository" "ballet" {
-  name               = "ballet"
-  visibility         = "private"
-  archived           = true
-  has_downloads      = false
-  has_issues         = true
-  has_projects       = false
-  has_wiki           = false
-  allow_merge_commit = false
-  allow_squash_merge = true
-  allow_rebase_merge = true
-}
-
-resource "github_repository" "cpan-graph" {
-  name               = "cpan-graph"
-  visibility         = "private"
-  archived           = true
-  has_downloads      = false
-  has_issues         = true
-  has_projects       = false
-  has_wiki           = false
-  allow_merge_commit = false
-  allow_squash_merge = true
-  allow_rebase_merge = true
-}
-
-resource "github_repository" "demorest" {
-  name               = "demorest"
-  visibility         = "private"
-  archived           = true
-  has_downloads      = false
-  has_issues         = true
-  has_projects       = false
-  has_wiki           = false
-  allow_merge_commit = false
-  allow_squash_merge = true
-  allow_rebase_merge = true
-}
-
-resource "github_repository" "devbox" {
-  name               = "devbox"
-  visibility         = "private"
-  archived           = true
-  has_downloads      = false
-  has_issues         = true
-  has_projects       = false
-  has_wiki           = false
-  allow_merge_commit = false
-  allow_squash_merge = true
-  allow_rebase_merge = true
-}
-
-resource "github_repository" "emacsd" {
-  name                 = "emacs.d"
-  visibility           = "private"
-  has_downloads        = false
-  has_issues           = true
-  has_projects         = false
-  has_wiki             = false
-  allow_merge_commit   = false
-  allow_squash_merge   = true
-  allow_rebase_merge   = true
-  vulnerability_alerts = true
-}
-
-resource "github_repository" "feeddiscovery" {
-  name               = "feeddiscovery"
-  visibility         = "private"
-  archived           = true
-  has_downloads      = false
-  has_issues         = true
-  has_projects       = false
-  has_wiki           = false
-  allow_merge_commit = false
-  allow_squash_merge = true
-  allow_rebase_merge = true
-}
-
-resource "github_repository" "graph-gexf" {
-  name               = "graph-gexf"
-  visibility         = "private"
-  archived           = true
-  has_downloads      = false
-  has_issues         = true
-  has_projects       = false
-  has_wiki           = false
-  allow_merge_commit = false
-  allow_squash_merge = true
-  allow_rebase_merge = true
-}
-
-resource "github_repository" "kiokudb-backend-memcachedb" {
-  name               = "kiokudb-backend-memcachedb"
-  visibility         = "private"
-  archived           = true
-  has_downloads      = false
-  has_issues         = true
-  has_projects       = false
-  has_wiki           = false
-  allow_merge_commit = false
-  allow_squash_merge = true
-  allow_rebase_merge = true
-}
-
-resource "github_repository" "kiokudb-backend-riak" {
-  name               = "kiokudb-backend-riak"
-  visibility         = "private"
-  archived           = true
-  has_downloads      = false
-  has_issues         = true
-  has_projects       = false
-  has_wiki           = false
-  allow_merge_commit = false
-  allow_squash_merge = true
-  allow_rebase_merge = true
-}
-
-resource "github_repository" "lwpx-paranoidagent" {
-  name               = "lwpx-paranoidagent"
-  visibility         = "private"
-  archived           = true
-  has_downloads      = false
-  has_issues         = true
-  has_projects       = false
-  has_wiki           = false
-  allow_merge_commit = false
-  allow_squash_merge = true
-  allow_rebase_merge = true
-}
-
-resource "github_repository" "moosex-abstractfactory" {
-  name               = "moosex-abstractfactory"
-  visibility         = "private"
-  archived           = true
-  has_downloads      = false
-  has_issues         = true
-  has_projects       = false
-  has_wiki           = false
-  allow_merge_commit = false
-  allow_squash_merge = true
-  allow_rebase_merge = true
-}
-
-resource "github_repository" "moosex-methodprivate" {
-  name               = "moosex-methodprivate"
-  visibility         = "private"
-  archived           = true
-  has_downloads      = false
-  has_issues         = true
-  has_projects       = false
-  has_wiki           = false
-  allow_merge_commit = false
-  allow_squash_merge = true
-  allow_rebase_merge = true
-}
-
-resource "github_repository" "moosex-privacy" {
-  name               = "moosex-privacy"
-  visibility         = "private"
-  archived           = true
-  has_downloads      = false
-  has_issues         = true
-  has_projects       = false
-  has_wiki           = false
-  allow_merge_commit = false
-  allow_squash_merge = true
-  allow_rebase_merge = true
-}
-
-resource "github_repository" "moosex-useragent" {
-  name               = "moosex-useragent"
-  visibility         = "private"
-  archived           = true
-  has_downloads      = false
-  has_issues         = true
-  has_projects       = false
-  has_wiki           = false
-  allow_merge_commit = false
-  allow_squash_merge = true
-  allow_rebase_merge = true
-}
-
-resource "github_repository" "notebooks" {
-  name               = "notebooks"
-  visibility         = "private"
-  has_downloads      = false
-  has_issues         = false
-  has_projects       = false
-  has_wiki           = false
-  allow_merge_commit = false
-  allow_squash_merge = true
-  allow_rebase_merge = true
-}
-
-resource "github_repository" "password-store" {
-  name               = "password-store"
-  visibility         = "private"
-  has_downloads      = false
-  has_issues         = false
-  has_projects       = false
-  has_wiki           = false
-  allow_merge_commit = false
-  allow_squash_merge = true
-  allow_rebase_merge = true
-}
-
-resource "github_repository" "world" {
-  name                 = "world"
-  visibility           = "private"
-  has_downloads        = false
-  has_issues           = true
-  has_projects         = false
-  has_wiki             = false
-  allow_merge_commit   = false
-  allow_squash_merge   = true
-  allow_rebase_merge   = true
-  vulnerability_alerts = true
-}
-
-resource "github_repository" "gh-ssh-keys" {
-  name                   = "gh-ssh-keys"
-  visibility             = "private"
-  delete_branch_on_merge = true
-  has_downloads          = false
-  has_issues             = true
-  has_projects           = false
-  has_wiki               = false
-  allow_merge_commit     = false
-  allow_squash_merge     = true
-  allow_rebase_merge     = true
-  vulnerability_alerts   = true
-}
-
-resource "github_repository" "fcuny-net" {
-  name                   = "fcuny.net"
-  visibility             = "private"
-  delete_branch_on_merge = true
-  has_downloads          = false
-  has_issues             = true
-  has_projects           = false
-  has_wiki               = false
-  allow_merge_commit     = false
-  allow_squash_merge     = true
-  allow_rebase_merge     = true
-  vulnerability_alerts   = true
-}
-
-resource "github_repository" "notes-fcuny-net" {
-  name                   = "notes.fcuny.net"
-  visibility             = "private"
-  delete_branch_on_merge = true
-  has_downloads          = false
-  has_issues             = true
-  has_projects           = false
-  has_wiki               = false
-  allow_merge_commit     = false
-  allow_squash_merge     = true
-  allow_rebase_merge     = true
-  vulnerability_alerts   = true
-}
-
-resource "github_repository" "govanity" {
-  name                   = "govanity"
-  visibility             = "private"
-  delete_branch_on_merge = true
-  has_downloads          = false
-  has_issues             = true
-  has_projects           = false
-  has_wiki               = false
-  allow_merge_commit     = false
-  allow_squash_merge     = true
-  allow_rebase_merge     = true
-  vulnerability_alerts   = true
-}
-
-resource "github_repository" "twitter-backup" {
-  name                   = "twitter-backup"
-  visibility             = "private"
-  delete_branch_on_merge = true
-  has_downloads          = false
-  has_issues             = true
-  has_projects           = false
-  has_wiki               = false
-  allow_merge_commit     = false
-  allow_squash_merge     = true
-  allow_rebase_merge     = true
-  vulnerability_alerts   = true
-}
diff --git a/ops/github/repositories_public.tf b/ops/github/repositories_public.tf
deleted file mode 100644
index 19ecb7f..0000000
--- a/ops/github/repositories_public.tf
+++ /dev/null
@@ -1,85 +0,0 @@
-# github_repository.jitterbug:
-resource "github_repository" "jitterbug" {
-  name                   = "jitterbug"
-  archived               = true
-  allow_auto_merge       = false
-  allow_merge_commit     = false
-  allow_rebase_merge     = false
-  allow_squash_merge     = false
-  delete_branch_on_merge = true
-  description            = "Cross Language Continuous Integration for Git"
-  has_downloads          = true
-  has_issues             = true
-  has_projects           = true
-  has_wiki               = true
-  homepage_url           = "http://lumberjaph.net/jitterbug/"
-  vulnerability_alerts   = true
-  pages {
-    cname = "jitterbug.pl"
-    source {
-      branch = "gh-pages"
-      path   = "/"
-    }
-  }
-}
-
-# github_repository.presque:
-resource "github_repository" "presque" {
-  name                   = "presque"
-  archived               = true
-  allow_auto_merge       = false
-  allow_merge_commit     = false
-  allow_rebase_merge     = false
-  allow_squash_merge     = false
-  delete_branch_on_merge = true
-  description            = "a simple redis/tatsumaki message queue"
-  has_downloads          = true
-  has_issues             = true
-  has_projects           = true
-  has_wiki               = true
-  vulnerability_alerts   = true
-}
-
-# github_repository.webservice-google-suggest:
-resource "github_repository" "webservice-google-suggest" {
-  name                   = "webservice-google-suggest"
-  archived               = true
-  allow_auto_merge       = false
-  allow_merge_commit     = false
-  allow_rebase_merge     = false
-  allow_squash_merge     = false
-  delete_branch_on_merge = true
-  description            = "WebService::Google::Suggest allows you to use Google Suggest as a Web Service API to retrieve completions to your search query or partial query"
-  has_downloads          = true
-  has_issues             = true
-  has_projects           = true
-  has_wiki               = true
-  vulnerability_alerts   = true
-}
-
-resource "github_repository" "anyevent-riak" {
-  name                 = "anyevent-riak"
-  archived             = true
-  has_downloads        = false
-  has_issues           = true
-  has_projects         = false
-  has_wiki             = false
-  allow_merge_commit   = false
-  allow_squash_merge   = true
-  allow_rebase_merge   = true
-  vulnerability_alerts = true
-}
-
-resource "github_repository" "containerd-to-vm" {
-  name                   = "containerd-to-vm"
-  delete_branch_on_merge = true
-  archived               = false
-  has_downloads          = false
-  has_issues             = true
-  has_projects           = false
-  has_wiki               = false
-  allow_merge_commit     = false
-  allow_squash_merge     = true
-  allow_rebase_merge     = true
-  vulnerability_alerts   = true
-}