22 lines
757 B
HCL
22 lines
757 B
HCL
resource "gitlab_group" "group" {
|
|
name = var.name
|
|
path = var.name
|
|
description = var.description
|
|
parent_id = var.parent_group != "" ? data.gitlab_group.parent[0].id : null
|
|
avatar = var.type != "" ? "${path.module}/images/${var.type}.png" : null
|
|
avatar_hash = var.type != "" ? filesha256("${path.module}/images/${var.type}.png") : null
|
|
}
|
|
|
|
resource "gitlab_group_variable" "ci_variables" {
|
|
for_each = local.default_ci_variables
|
|
|
|
group = gitlab_group.group.id
|
|
key = each.key
|
|
value = each.value.value
|
|
description = each.value.description
|
|
protected = each.value.protected
|
|
masked = each.value.masked
|
|
environment_scope = each.value.environment_scope
|
|
}
|
|
|