InstanceVariableArgs

data class InstanceVariableArgs(val key: Output<String>? = null, val masked: Output<Boolean>? = null, val protected: Output<Boolean>? = null, val value: Output<String>? = null, val variableType: Output<String>? = null) : ConvertibleToJava<InstanceVariableArgs>

The gitlab.InstanceVariable resource allows to manage the lifecycle of an instance-level CI/CD variable. Upstream API: GitLab REST API docs

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.InstanceVariable;
import com.pulumi.gitlab.InstanceVariableArgs;
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 InstanceVariable("example", InstanceVariableArgs.builder()
.key("instance_variable_key")
.masked(false)
.protected_(false)
.value("instance_variable_value")
.build());
}
}

Import

GitLab instance variables can be imported using an id made up of variablename, e.g.

$ pulumi import gitlab:index/instanceVariable:InstanceVariable example instance_variable_key

Constructors

Link copied to clipboard
constructor(key: Output<String>? = null, masked: Output<Boolean>? = null, protected: Output<Boolean>? = null, value: Output<String>? = null, variableType: Output<String>? = null)

Properties

Link copied to clipboard
val key: Output<String>? = null

The name of the variable.

Link copied to clipboard
val masked: Output<Boolean>? = null

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
val protected: Output<Boolean>? = null

If set to true, the variable will be passed only to pipelines running on protected branches and tags. Defaults to false.

Link copied to clipboard
val value: Output<String>? = null

The value of the variable.

Link copied to clipboard
val variableType: Output<String>? = null

The type of a variable. Valid values are: env_var, file. Default is env_var.

Functions

Link copied to clipboard
open override fun toJava(): InstanceVariableArgs