Files
gitlab-group/variable.tf
2025-11-01 23:37:52 +01:00

106 lines
2.2 KiB
HCL

variable "name" {
type = string
description = "Name of the gitlab group"
}
variable "description" {
type = string
description = "Description of the gitlab group"
}
variable "parent_group" {
type = string
description = "Gitlab parent group"
}
variable "visibility" {
type = string
default = "private"
description = "The group's visibility"
validation {
condition = contains([
"private",
"internal",
"public"
], var.visibility)
error_message = "Unsupported group visibility"
}
}
variable "default_branch" {
type = string
default = "main"
description = "The group's default branch"
}
variable "allowed_avatar_types_json" {
type = string
default = ""
description = "Path to allowed avatar types json"
}
variable "avatar" {
type = string
description = "Type of the icon for the group (default: from type)"
default = ""
validation {
condition = contains(local.allowed_avatar_types, var.avatar)
error_message = "Unsupported group type"
}
}
variable "labels" {
type = map(object({
description = string
color = string
}))
default = {}
}
variable "badges" {
type = map(object({
link_url = string
image_url = string
}))
default = {}
}
variable "variables" {
type = map(object({
value = string
description = optional(string)
protected = optional(bool)
masked = optional(bool)
environment_scope = optional(string)
}))
default = {}
}
variable "permissions" {
type = map(object({
permission = string
}))
validation {
condition = alltrue([for k, v in var.permissions :
v.permission == "owner" ||
v.permission == "maintainer" ||
v.permission == "developer" ||
v.permission == "reporter" ||
v.permission == "guest"
])
error_message = "Each permission must be one of the following values: owner, maintainer, developer, reporter, guest"
}
description = "Group permission mapping"
default = {}
}
variable "avatars_dir" {
description = "Avatars directory png files"
type = string
default = ""
}