InstanceVariable

class InstanceVariable : KotlinCustomResource

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

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const example = new gitlab.InstanceVariable("example", {
key: "instance_variable_key",
value: "instance_variable_value",
"protected": false,
masked: false,
});
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.InstanceVariable("example",
key="instance_variable_key",
value="instance_variable_value",
protected=False,
masked=False)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var example = new GitLab.InstanceVariable("example", new()
{
Key = "instance_variable_key",
Value = "instance_variable_value",
Protected = false,
Masked = false,
});
});
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v7/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.NewInstanceVariable(ctx, "example", &gitlab.InstanceVariableArgs{
Key: pulumi.String("instance_variable_key"),
Value: pulumi.String("instance_variable_value"),
Protected: pulumi.Bool(false),
Masked: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
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")
.value("instance_variable_value")
.protected_(false)
.masked(false)
.build());
}
}
resources:
example:
type: gitlab:InstanceVariable
properties:
key: instance_variable_key
value: instance_variable_value
protected: false
masked: false

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

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val key: Output<String>

The name of the variable.

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

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>?

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 pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val raw: Output<Boolean>?

Whether the variable is treated as a raw string. Default: false. When true, variables in the value are not expanded.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val value: Output<String>

The value of the variable.

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

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