Skip to content

dhoppeIT/terraform-gitlab-group_variable

Repository files navigation

terraform-gitlab-group_variable

Terraform module to manage the following GitLab resources:

  • gitlab_group_variable

Usage

Copy and paste the following code snippet to your Terraform configuration, specify the required variables and run the command terraform init.

module "gitlab_group_access_token" {
  source  = "gitlab.com/terraform-child-modules-48151/terraform-gitlab-group-access-token/local"
  version = "1.0.0"

  group  = "example-group-48165"
  name   = "example-access-token"
  scopes = ["read_api"]
}

module "gitlab_group_variable" {
  source  = "gitlab.com/terraform-child-modules-48151/terraform-gitlab-group-variable/local"
  version = "1.1.0"

  group = "example-group-48165"
  key   = "example_key"
  value = module.gitlab_group_access_token.token

  masked = true
}

Requirements

Name Version
terraform >= 1.0
gitlab ~> 18.0

Providers

Name Version
gitlab ~> 18.0

Modules

No modules.

Resources

Name Type
gitlab_group_variable.this resource

Inputs

Name Description Type Default Required
description The description of the variable string null no
environment_scope The environment scope of the variable string "*" no
group The name or id of the group string n/a yes
hidden If set to true, the value of the variable will be hidden in the CI/CD User Interface bool false no
key The name of the variable string n/a yes
masked If set to true, the value of the variable will be hidden in job logs bool false no
protected If set to true, the variable will be passed only to pipelines running on protected branches and tags bool false no
raw Whether the variable is treated as a raw string bool false no
value The value of the variable string n/a yes
variable_type The type of a variable string "env_var" no

Outputs

Name Description
id The ID of this resource

Authors

Created and maintained by Dennis Hoppe.

License

Apache 2 licensed. See LICENSE for full details.