chore: defaults
This commit is contained in:
		
							
								
								
									
										100
									
								
								variable.tf
									
									
									
									
									
								
							
							
						
						
									
										100
									
								
								variable.tf
									
									
									
									
									
								
							@@ -1,9 +1,105 @@
 | 
			
		||||
variable "name" {
 | 
			
		||||
  type        = string
 | 
			
		||||
  description = "name"
 | 
			
		||||
  description = "Name of the gitlab group"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
variable "description" {
 | 
			
		||||
  type        = string
 | 
			
		||||
  description = "description"
 | 
			
		||||
  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     = ""
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user