forked from karstenagathon/terraform-github-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
143 lines (114 loc) · 4.51 KB
/
variables.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Required inputs
variable "description" {
type = string
description = "the repository description"
}
variable "name" {
type = string
description = "the repository name"
}
variable "repository_collaborators_permission" {
type = map(string)
description = "the collaborator permission settings for the repository; each username is mapped to a permission (admin, pull, or push)"
}
variable "repository_teams_permission" {
type = map(string)
description = "the team permission settings for the repository; each team is mapped to a permission (admin, pull, or push)"
}
# Optional inputs, check at code tab
variable "homepage_url" {
default = ""
description = "the repository homepage URL, if any"
}
variable "topics" {
type = list(string)
default = []
description = "the repository topics to help searching in Github"
}
# Optional inputs, check at settings tab
variable "allow_merge_commit" {
default = false
description = "allow landing a PR by merge commit in this repository, note this is incompatible with linear history requirement"
}
variable "allow_rebase_merge" {
default = false
description = "allow landing a PR by rebasing all commits to base branch as is in this repository"
}
variable "allow_squash_merge" {
default = true
description = "allow landing a PR by squashing all commits to a commit and rebase to base branch in this repository"
}
variable "archived" {
type = string
default = false
description = "whether the repository should be archived or not, note that it's impossible to unarchive repos from Github API for now, so leave this at false for now"
}
variable "default_branch" {
default = ""
description = "the name of the default branch of the repository. Only applicable if the repository and the branch is already created"
}
variable "has_downloads" {
default = false
description = "enable github downloads API for the repository, this API is already deprecated, it's best to disable it"
}
variable "has_issues" {
default = true
description = "enable github issues feature for the repository"
}
variable "has_wiki" {
default = false
description = "enable github wiki feature for the repository"
}
variable "private" {
default = true
description = "set whether the repository visibility is private, note only github admins can switch this once a repository is created"
}
# Optional inputs, for default branch protection rule (in settings/branches)
variable "dismiss_review_users" {
type = list(string)
default = []
description = "the users which is granted the access to dismiss review on the protected branch"
}
variable "enforce_admins" {
type = string
default = true
description = "whether the admin should be enforced to follow the branch protection rule or not"
}
variable "force_pr_rebase" {
type = string
default = true
description = "whether PR should have up-to-date base branch (e.g. rebased) before they're merged"
}
variable "status_checks_contexts" {
type = list(string)
default = []
description = "The list of required status checks in order to merge into the protected branch, e.g. AWS CodeBuild ap-southeast-1 (<codebuild_project_name>)"
}
# Optional inputs, for setting initial commit in the new repository
variable "auto_init" {
default = true
description = "set whether an initial commit should be made to the repository"
}
variable "gitignore_template" {
default = ""
description = "select github gitignore tempate to init the repository with; see https://github.com/github/gitignore"
}
variable "license_template" {
default = ""
description = "select github license tempate to init the repository with; see https://github.com/github/choosealicense.com/tree/gh-pages/_licenses"
}
# Optional input, for using a repository template to initialize the repository
# known interactions:
# - auto_init set to false, template_repository and template_owner filled -> there is still a commit "Initial commit" that matches the template
# - auto_init set to true, template_repository and template_owner left with default value -> Initial commit with just README.md
# - template_repository set to null -> error
variable "template_repository" {
type = string
default = ""
description = "The name of repository template for creating the new repository"
}
variable "template_owner" {
type = string
default = ""
description = "The name of organization who owned the repository template"
}