-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
variables.tf
123 lines (105 loc) · 2.66 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
variable "attach_admin_policy" {
default = false
description = "Attach AdministratorAccess policy"
type = bool
}
variable "attach_read_only_policy" {
default = true
description = "Attach ReadOnly policy"
type = bool
}
variable "create_oidc_provider" {
default = true
description = "Create GitLab OIDC provider"
type = bool
}
variable "enabled" {
default = true
description = "Enable resource creation"
type = bool
}
variable "force_detach_policies" {
default = false
description = "Force detach IAM policies"
type = bool
}
variable "gitlab_organisation" {
description = "GitLab organisation name"
type = string
validation {
condition = length(var.gitlab_organisation) > 0
error_message = "GitLab organisation name must not be empty."
}
}
variable "gitlab_repositories" {
type = list(object({
name = string
refs = list(string)
ref_type = string
}))
default = [
{
name = ""
refs = []
ref_type = ""
}
]
description = "List of GitLab repositories and refs"
validation {
condition = alltrue([for repo in var.gitlab_repositories : length(repo.name) > 0])
error_message = "Each GitLab repository must have a non-empty name."
}
}
variable "iam_role_name" {
default = "gitlab-runner"
description = "IAM role name"
type = string
validation {
condition = length(var.iam_role_name) > 0
error_message = "IAM role name must not be empty."
}
}
variable "iam_role_path" {
default = "/"
description = "IAM role path"
type = string
sensitive = false
validation {
condition = length(var.iam_role_path) > 0
error_message = "IAM role path must not be empty."
}
}
variable "iam_role_permissions_boundary" {
default = ""
description = "IAM role permissions boundary ARN"
type = string
sensitive = false
}
variable "iam_role_policy_arns" {
default = []
description = "List of IAM policy ARNs"
type = list(string)
sensitive = false
}
variable "max_session_duration" {
default = 3600
description = "Max session duration (seconds)"
type = number
sensitive = false
validation {
condition = var.max_session_duration >= 3600 && var.max_session_duration <= 43200
error_message = "Session duration must be between 3600 and 43200 seconds."
}
}
variable "url" {
type = string
description = "Identity provider URL"
default = "gitlab.com"
sensitive = false
}
variable "tags" {
default = {}
description = "Resource tags"
type = map(string)
sensitive = false
}