-
Notifications
You must be signed in to change notification settings - Fork 3
/
variables.tf
95 lines (80 loc) · 2.49 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
variable "approvals_required" {
default = 1
description = "The minimum number of approvals required for MRs"
type = number
}
variable "author_email_regex" {
default = null
description = <<EOF
All commit author emails must match this regex. As part of [Push Rules](https://docs.gitlab.com/ee/push_rules/push_rules.html), it's only available for GitLab Premium
EOF
type = string
}
variable "container_registry_enabled" {
default = true
description = "Enable container registry for the project"
type = bool
}
variable "default_branch" {
default = "main"
description = "The default branch for the project"
type = string
}
variable "description" {
description = "A short description of the project"
type = string
validation {
condition = can(tostring(var.description))
error_message = "Provided description is invalid."
}
}
variable "name" {
description = "Name of the project"
type = string
validation {
condition = can(regex("[[:graph:]]", var.name))
error_message = "Provided name has invalid characters."
}
}
variable "namespace_id" {
description = "The group where the project belongs to"
type = string
}
variable "owners" {
default = []
description = <<EOF
A list of specific User IDs allowed to approve Merge Requests. Please refer to [Gitlab documentation](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/index.html) for further information
EOF
type = list(string)
validation {
condition = can([for o in var.owners : tonumber(o)])
error_message = "Invalid User ID provided."
}
}
variable "pipelines_enabled" {
default = true
description = "Enable pipelines for the project"
type = bool
}
variable "shared_runners_enabled" {
default = true
description = "Enable [shared runners](https://docs.gitlab.com/ee/ci/runners/) for the project"
type = bool
}
variable "tags" {
default = []
description = "The list of tags to be attached to the project"
type = list(string)
}
variable "template_project_id" {
default = null
description = <<EOF
Project ID of a custom project template. Please refer to [Gitlab documentation](https://docs.gitlab.com/ee/user/group/custom_project_templates.html) for further information
EOF
type = number
}
variable "use_custom_template" {
default = false
description = "Use either custom instance or group-level project template"
type = bool
}