getProjectVariable

The gitlab.ProjectVariable data source allows to retrieve details about a project-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.GitlabFunctions;
import com.pulumi.gitlab.inputs.GetProjectVariableArgs;
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 foo = GitlabFunctions.getProjectVariable(GetProjectVariableArgs.builder()
.key("foo")
.project("my/example/project")
.build());
final var bar = GitlabFunctions.getProjectVariable(GetProjectVariableArgs.builder()
.environmentScope("staging/*")
.key("bar")
.project("my/example/project")
.build());
}
}

Return

A collection of values returned by getProjectVariable. */

Parameters

argument

A collection of arguments for invoking getProjectVariable.


suspend fun getProjectVariable(environmentScope: String? = null, key: String, project: String): GetProjectVariableResult

Return

A collection of values returned by getProjectVariable.

Parameters

environmentScope

The environment scope of the variable. Defaults to all environment (*). Note that in Community Editions of Gitlab, values other than * will cause inconsistent plans.

key

The name of the variable.

project

The name or id of the project.

See also


Return

A collection of values returned by getProjectVariable.

Parameters

argument

Builder for com.pulumi.gitlab.kotlin.inputs.GetProjectVariablePlainArgs.

See also