-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.tf
32 lines (29 loc) · 1.24 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module "repository" {
version = "0.0.4"
source = "damacus/github-repository/module"
for_each = { for repo in var.repository : repo.name => repo }
name = each.value.name
repo_type = each.value.repo_type != null ? each.value.repo_type : "ruby_gem"
description_override = each.value.description_override
homepage_url_override = each.value.homepage_url_override
additional_topics = compact(
concat(local.default_gem_topics, each.value.additional_topics != null ? each.value.additional_topics : [""])
)
additional_status_checks = each.value.additional_status_checks != null ? each.value.additional_status_checks : []
projects_enabled = each.value.projects_enabled
}
variable "repository" {
type = list(object({
name = string
repo_type = string
description_override = optional(string)
homepage_url_override = optional(string)
additional_topics = optional(list(string)),
additional_status_checks = optional(list(string))
projects_enabled = optional(bool)
}))
description = "The repositories to create."
}
locals {
default_gem_topics = ["ruby", "ruby-gem", "hacktoberfest", "test-kitchen", "testing"]
}