get Project Variables
The gitlab.getProjectVariables
data source allows to retrieve all project-level CI/CD variables. 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.GetProjectVariablesArgs;
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.getProjectVariables(GetProjectVariablesArgs.builder()
.project("my/example/project")
.build());
final var stagingVars = GitlabFunctions.getProjectVariables(GetProjectVariablesArgs.builder()
.environmentScope("staging/*")
.project("my/example/project")
.build());
}
}
Content copied to clipboard
Return
A collection of values returned by getProjectVariables. */
Parameters
argument
A collection of arguments for invoking getProjectVariables.
suspend fun getProjectVariables(environmentScope: String? = null, project: String): GetProjectVariablesResult
Return
A collection of values returned by getProjectVariables.
Parameters
environment Scope
The environment scope of the variable. Defaults to all environment (*
).
project
The name or id of the project.
See also
suspend fun getProjectVariables(argument: suspend GetProjectVariablesPlainArgsBuilder.() -> Unit): GetProjectVariablesResult
Return
A collection of values returned by getProjectVariables.
Parameters
argument
Builder for com.pulumi.gitlab.kotlin.inputs.GetProjectVariablesPlainArgs.