GitLab v8.10.0 published on Friday, Mar 21, 2025 by Pulumi
gitlab.getGroupIds
Explore with Pulumi AI
The gitlab.getGroupIds data source identification information for a given group, allowing a user to translate a full path or ID into the GraphQL ID of the group.
Upstream API: GitLab GraphQL API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const newGroup = new gitlab.Group("new_group", {});
// use group IDs to get additional information, such as the GraphQL ID
// for other resources
const foo = gitlab.getGroupIds({
    group: "gitlab_group.new_group.id",
});
export const graphQLId = foo.then(foo => foo.groupGraphqlId);
import pulumi
import pulumi_gitlab as gitlab
new_group = gitlab.Group("new_group")
# use group IDs to get additional information, such as the GraphQL ID
# for other resources
foo = gitlab.get_group_ids(group="gitlab_group.new_group.id")
pulumi.export("graphQLId", foo.group_graphql_id)
package main
import (
	"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := gitlab.NewGroup(ctx, "new_group", nil)
		if err != nil {
			return err
		}
		// use group IDs to get additional information, such as the GraphQL ID
		// for other resources
		foo, err := gitlab.GetGroupIds(ctx, &gitlab.GetGroupIdsArgs{
			Group: "gitlab_group.new_group.id",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("graphQLId", foo.GroupGraphqlId)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() => 
{
    var newGroup = new GitLab.Group("new_group");
    // use group IDs to get additional information, such as the GraphQL ID
    // for other resources
    var foo = GitLab.GetGroupIds.Invoke(new()
    {
        Group = "gitlab_group.new_group.id",
    });
    return new Dictionary<string, object?>
    {
        ["graphQLId"] = foo.Apply(getGroupIdsResult => getGroupIdsResult.GroupGraphqlId),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.Group;
import com.pulumi.gitlab.GitlabFunctions;
import com.pulumi.gitlab.inputs.GetGroupIdsArgs;
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 newGroup = new Group("newGroup");
        // use group IDs to get additional information, such as the GraphQL ID
        // for other resources
        final var foo = GitlabFunctions.getGroupIds(GetGroupIdsArgs.builder()
            .group("gitlab_group.new_group.id")
            .build());
        ctx.export("graphQLId", foo.applyValue(getGroupIdsResult -> getGroupIdsResult.groupGraphqlId()));
    }
}
resources:
  newGroup:
    type: gitlab:Group
    name: new_group
variables:
  # use group IDs to get additional information, such as the GraphQL ID
  # // for other resources
  foo:
    fn::invoke:
      function: gitlab:getGroupIds
      arguments:
        group: gitlab_group.new_group.id
outputs:
  graphQLId: ${foo.groupGraphqlId}
Using getGroupIds
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 getGroupIds(args: GetGroupIdsArgs, opts?: InvokeOptions): Promise<GetGroupIdsResult>
function getGroupIdsOutput(args: GetGroupIdsOutputArgs, opts?: InvokeOptions): Output<GetGroupIdsResult>def get_group_ids(group: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetGroupIdsResult
def get_group_ids_output(group: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetGroupIdsResult]func GetGroupIds(ctx *Context, args *GetGroupIdsArgs, opts ...InvokeOption) (*GetGroupIdsResult, error)
func GetGroupIdsOutput(ctx *Context, args *GetGroupIdsOutputArgs, opts ...InvokeOption) GetGroupIdsResultOutput> Note: This function is named GetGroupIds in the Go SDK.
public static class GetGroupIds 
{
    public static Task<GetGroupIdsResult> InvokeAsync(GetGroupIdsArgs args, InvokeOptions? opts = null)
    public static Output<GetGroupIdsResult> Invoke(GetGroupIdsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGroupIdsResult> getGroupIds(GetGroupIdsArgs args, InvokeOptions options)
public static Output<GetGroupIdsResult> getGroupIds(GetGroupIdsArgs args, InvokeOptions options)
fn::invoke:
  function: gitlab:index/getGroupIds:getGroupIds
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Group string
 - The ID or URL-encoded path of the group.
 
- Group string
 - The ID or URL-encoded path of the group.
 
- group String
 - The ID or URL-encoded path of the group.
 
- group string
 - The ID or URL-encoded path of the group.
 
- group str
 - The ID or URL-encoded path of the group.
 
- group String
 - The ID or URL-encoded path of the group.
 
getGroupIds Result
The following output properties are available:
- Group string
 - The ID or URL-encoded path of the group.
 - Group
Full stringPath  - The full path of the group.
 - Group
Graphql stringId  - The GraphQL ID of the group.
 - Group
Id string - The ID of the group.
 - Id string
 
- Group string
 - The ID or URL-encoded path of the group.
 - Group
Full stringPath  - The full path of the group.
 - Group
Graphql stringId  - The GraphQL ID of the group.
 - Group
Id string - The ID of the group.
 - Id string
 
- group String
 - The ID or URL-encoded path of the group.
 - group
Full StringPath  - The full path of the group.
 - group
Graphql StringId  - The GraphQL ID of the group.
 - group
Id String - The ID of the group.
 - id String
 
- group string
 - The ID or URL-encoded path of the group.
 - group
Full stringPath  - The full path of the group.
 - group
Graphql stringId  - The GraphQL ID of the group.
 - group
Id string - The ID of the group.
 - id string
 
- group str
 - The ID or URL-encoded path of the group.
 - group_
full_ strpath  - The full path of the group.
 - group_
graphql_ strid  - The GraphQL ID of the group.
 - group_
id str - The ID of the group.
 - id str
 
- group String
 - The ID or URL-encoded path of the group.
 - group
Full StringPath  - The full path of the group.
 - group
Graphql StringId  - The GraphQL ID of the group.
 - group
Id String - The ID of the group.
 - id String
 
Package Details
- Repository
 - GitLab pulumi/pulumi-gitlab
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
gitlabTerraform Provider.