Show / Hide Table of Contents

Class ProjectVariable

This resource allows you to create and manage CI/CD variables for your GitLab projects. For further information on variables, consult the gitlab documentation.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var example = new GitLab.ProjectVariable("example", new GitLab.ProjectVariableArgs
    {
        Key = "project_variable_key",
        Project = "12345",
        Protected = false,
        Value = "project_variable_value",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
ProjectVariable
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.GitLab
Assembly: Pulumi.GitLab.dll
Syntax
public class ProjectVariable : CustomResource

Constructors

View Source

ProjectVariable(String, ProjectVariableArgs, CustomResourceOptions)

Create a ProjectVariable resource with the given unique name, arguments, and options.

Declaration
public ProjectVariable(string name, ProjectVariableArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ProjectVariableArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

EnvironmentScope

The environment_scope of the variable

Declaration
public Output<string> EnvironmentScope { get; }
Property Value
Type Description
Output<System.String>
View Source

Key

The name of the variable.

Declaration
public Output<string> Key { get; }
Property Value
Type Description
Output<System.String>
View Source

Masked

If set to true, the variable will be masked if it would have been written to the logs. Defaults to false.

Declaration
public Output<bool?> Masked { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Project

The name or id of the project to add the hook to.

Declaration
public Output<string> Project { get; }
Property Value
Type Description
Output<System.String>
View Source

Protected

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

Declaration
public Output<bool?> Protected { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Value

The value of the variable.

Declaration
public Output<string> Value { get; }
Property Value
Type Description
Output<System.String>
View Source

VariableType

The type of a variable. Available types are: env_var (default) and file.

Declaration
public Output<string> VariableType { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, ProjectVariableState, CustomResourceOptions)

Get an existing ProjectVariable resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static ProjectVariable Get(string name, Input<string> id, ProjectVariableState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ProjectVariableState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
ProjectVariable
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.