1. Packages
  2. Gitlab Provider
  3. API Docs
  4. getInstanceVariables
GitLab v9.3.0 published on Monday, Sep 29, 2025 by Pulumi

gitlab.getInstanceVariables

Explore with Pulumi AI

gitlab logo
GitLab v9.3.0 published on Monday, Sep 29, 2025 by Pulumi

    The gitlab.getInstanceVariables data source retrieves all instance-level CI/CD variables.

    Upstream API: GitLab REST API docs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gitlab from "@pulumi/gitlab";
    
    const vars = gitlab.getInstanceVariables({});
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    vars = gitlab.get_instance_variables()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gitlab.GetInstanceVariables(ctx, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using GitLab = Pulumi.GitLab;
    
    return await Deployment.RunAsync(() => 
    {
        var vars = GitLab.GetInstanceVariables.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gitlab.GitlabFunctions;
    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) {
            final var vars = GitlabFunctions.getInstanceVariables(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
    
        }
    }
    
    variables:
      vars:
        fn::invoke:
          function: gitlab:getInstanceVariables
          arguments: {}
    

    Using getInstanceVariables

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getInstanceVariables(opts?: InvokeOptions): Promise<GetInstanceVariablesResult>
    function getInstanceVariablesOutput(opts?: InvokeOptions): Output<GetInstanceVariablesResult>
    def get_instance_variables(opts: Optional[InvokeOptions] = None) -> GetInstanceVariablesResult
    def get_instance_variables_output(opts: Optional[InvokeOptions] = None) -> Output[GetInstanceVariablesResult]
    func GetInstanceVariables(ctx *Context, opts ...InvokeOption) (*GetInstanceVariablesResult, error)
    func GetInstanceVariablesOutput(ctx *Context, opts ...InvokeOption) GetInstanceVariablesResultOutput

    > Note: This function is named GetInstanceVariables in the Go SDK.

    public static class GetInstanceVariables 
    {
        public static Task<GetInstanceVariablesResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetInstanceVariablesResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInstanceVariablesResult> getInstanceVariables(InvokeOptions options)
    public static Output<GetInstanceVariablesResult> getInstanceVariables(InvokeOptions options)
    
    fn::invoke:
      function: gitlab:index/getInstanceVariables:getInstanceVariables
      arguments:
        # arguments dictionary

    getInstanceVariables Result

    The following output properties are available:

    Id string
    The ID of this datasource. In the hardcoded format instance_variables.
    Variables List<Pulumi.GitLab.Outputs.GetInstanceVariablesVariable>
    The list of variables returned by the search.
    Id string
    The ID of this datasource. In the hardcoded format instance_variables.
    Variables []GetInstanceVariablesVariable
    The list of variables returned by the search.
    id String
    The ID of this datasource. In the hardcoded format instance_variables.
    variables List<GetInstanceVariablesVariable>
    The list of variables returned by the search.
    id string
    The ID of this datasource. In the hardcoded format instance_variables.
    variables GetInstanceVariablesVariable[]
    The list of variables returned by the search.
    id str
    The ID of this datasource. In the hardcoded format instance_variables.
    variables Sequence[GetInstanceVariablesVariable]
    The list of variables returned by the search.
    id String
    The ID of this datasource. In the hardcoded format instance_variables.
    variables List<Property Map>
    The list of variables returned by the search.

    Supporting Types

    GetInstanceVariablesVariable

    Description string
    The description of the variable. Maximum of 255 characters.
    Key string
    The name of the variable.
    Masked bool
    If set to true, the value of the variable will be hidden in job logs.
    Protected bool
    If set to true, the variable will be passed only to pipelines running on protected branches and tags.
    Raw bool
    If set to true, the variable will be treated as a raw string.
    Value string
    The value of the variable.
    VariableType string
    The type of the variable, either env_var or file.
    Description string
    The description of the variable. Maximum of 255 characters.
    Key string
    The name of the variable.
    Masked bool
    If set to true, the value of the variable will be hidden in job logs.
    Protected bool
    If set to true, the variable will be passed only to pipelines running on protected branches and tags.
    Raw bool
    If set to true, the variable will be treated as a raw string.
    Value string
    The value of the variable.
    VariableType string
    The type of the variable, either env_var or file.
    description String
    The description of the variable. Maximum of 255 characters.
    key String
    The name of the variable.
    masked Boolean
    If set to true, the value of the variable will be hidden in job logs.
    protected_ Boolean
    If set to true, the variable will be passed only to pipelines running on protected branches and tags.
    raw Boolean
    If set to true, the variable will be treated as a raw string.
    value String
    The value of the variable.
    variableType String
    The type of the variable, either env_var or file.
    description string
    The description of the variable. Maximum of 255 characters.
    key string
    The name of the variable.
    masked boolean
    If set to true, the value of the variable will be hidden in job logs.
    protected boolean
    If set to true, the variable will be passed only to pipelines running on protected branches and tags.
    raw boolean
    If set to true, the variable will be treated as a raw string.
    value string
    The value of the variable.
    variableType string
    The type of the variable, either env_var or file.
    description str
    The description of the variable. Maximum of 255 characters.
    key str
    The name of the variable.
    masked bool
    If set to true, the value of the variable will be hidden in job logs.
    protected bool
    If set to true, the variable will be passed only to pipelines running on protected branches and tags.
    raw bool
    If set to true, the variable will be treated as a raw string.
    value str
    The value of the variable.
    variable_type str
    The type of the variable, either env_var or file.
    description String
    The description of the variable. Maximum of 255 characters.
    key String
    The name of the variable.
    masked Boolean
    If set to true, the value of the variable will be hidden in job logs.
    protected Boolean
    If set to true, the variable will be passed only to pipelines running on protected branches and tags.
    raw Boolean
    If set to true, the variable will be treated as a raw string.
    value String
    The value of the variable.
    variableType String
    The type of the variable, either env_var or file.

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    GitLab v9.3.0 published on Monday, Sep 29, 2025 by Pulumi
      AI Agentic Workflows: Register now