Group Variable Args
data class GroupVariableArgs(val description: Output<String>? = null, val environmentScope: Output<String>? = null, val group: Output<String>? = null, val key: Output<String>? = null, val masked: Output<Boolean>? = null, val protected: Output<Boolean>? = null, val raw: Output<Boolean>? = null, val value: Output<String>? = null, val variableType: Output<String>? = null) : ConvertibleToJava<GroupVariableArgs>
The gitlab.GroupVariable
resource allows to manage the lifecycle of a CI/CD variable for a group. Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const example = new gitlab.GroupVariable("example", {
environmentScope: "*",
group: "12345",
key: "group_variable_key",
masked: false,
"protected": false,
value: "group_variable_value",
});
Content copied to clipboard
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.GroupVariable("example",
environment_scope="*",
group="12345",
key="group_variable_key",
masked=False,
protected=False,
value="group_variable_value")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var example = new GitLab.GroupVariable("example", new()
{
EnvironmentScope = "*",
Group = "12345",
Key = "group_variable_key",
Masked = false,
Protected = false,
Value = "group_variable_value",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.NewGroupVariable(ctx, "example", &gitlab.GroupVariableArgs{
EnvironmentScope: pulumi.String("*"),
Group: pulumi.String("12345"),
Key: pulumi.String("group_variable_key"),
Masked: pulumi.Bool(false),
Protected: pulumi.Bool(false),
Value: pulumi.String("group_variable_value"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.GroupVariable;
import com.pulumi.gitlab.GroupVariableArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new GroupVariable("example", GroupVariableArgs.builder()
.environmentScope("*")
.group("12345")
.key("group_variable_key")
.masked(false)
.protected_(false)
.value("group_variable_value")
.build());
}
}
Content copied to clipboard
resources:
example:
type: gitlab:GroupVariable
properties:
environmentScope: '*'
group: '12345'
key: group_variable_key
masked: false
protected: false
value: group_variable_value
Content copied to clipboard
Import
GitLab group variables can be imported using an id made up of groupid:variablename:scope
, e.g.
$ pulumi import gitlab:index/groupVariable:GroupVariable example 12345:group_variable_key:*
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(description: Output<String>? = null, environmentScope: Output<String>? = null, group: Output<String>? = null, key: Output<String>? = null, masked: Output<Boolean>? = null, protected: Output<Boolean>? = null, raw: Output<Boolean>? = null, value: Output<String>? = null, variableType: Output<String>? = null)
Properties
Link copied to clipboard
The description of the variable.
Link copied to clipboard
The environment scope of the variable. Defaults to all environment (*
). Note that in Community Editions of Gitlab, values other than *
will cause inconsistent plans.
Link copied to clipboard
If set to true
, the value of the variable will be hidden in job logs. The value must meet the masking requirements. Defaults to false
.
Link copied to clipboard
The type of a variable. Valid values are: env_var
, file
. Default is env_var
.