-
Notifications
You must be signed in to change notification settings - Fork 70
/
00-ros2_gbp.tf
68 lines (63 loc) · 1.8 KB
/
00-ros2_gbp.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
locals {
ros2_gbp_docs_team = [
"kscottz",
]
}
resource "github_repository" "dotgithub" {
name = ".github"
visibility = "public"
lifecycle {
# Plans that destroy repository releases will delete the repository on
# GitHub and that shouldn't be done in the normal course of operation.
prevent_destroy = true
# Ignore fields that are not set or managed by this terraform project
# to prevent unecessary drift.
ignore_changes = [
allow_merge_commit,
description,
has_downloads,
has_projects,
has_issues,
has_wiki,
vulnerability_alerts
]
}
}
resource "github_repository" "release-repository-template" {
name = "release-repository-template"
visibility = "public"
is_template = true
has_projects = false
lifecycle {
# Plans that destroy repository releases will delete the repository on
# GitHub and that shouldn't be done in the normal course of operation.
prevent_destroy = true
# Ignore fields that are not set or managed by this terraform project
# to prevent unecessary drift.
ignore_changes = [
allow_merge_commit,
description,
has_downloads,
has_issues,
has_wiki,
vulnerability_alerts
]
}
}
resource "github_team" "docs_team" {
name = "ros2-gbp-docs"
description = "ros2-gbp documentation contributors"
privacy = "closed"
create_default_maintainer = false
}
resource "github_team_membership" "docs_team" {
for_each = toset(local.ros2_gbp_docs_team)
team_id = github_team.docs_team.id
username = each.value
role = "member"
}
resource "github_team_repository" "docs_team" {
team_id = github_team.docs_team.id
repository = github_repository.dotgithub.name
permission = "maintain"
}