The gitlab.getGroupSubgroups data source allows to get subgroups of a group.
Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
export = async () => {
const subgroups = await gitlab.getGroupSubgroups({
groupId: 123456,
});
return {
subgroups: subgroups,
};
}
import pulumi
import pulumi_gitlab as gitlab
subgroups = gitlab.get_group_subgroups(group_id=123456)
pulumi.export("subgroups", subgroups)
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 {
subgroups, err := gitlab.GetGroupSubgroups(ctx, &gitlab.GetGroupSubgroupsArgs{
GroupId: 123456,
}, nil)
if err != nil {
return err
}
ctx.Export("subgroups", subgroups)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var subgroups = GitLab.GetGroupSubgroups.Invoke(new()
{
GroupId = 123456,
});
return new Dictionary<string, object?>
{
["subgroups"] = subgroups,
};
});
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.GetGroupSubgroupsArgs;
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 subgroups = GitlabFunctions.getGroupSubgroups(GetGroupSubgroupsArgs.builder()
.groupId(123456)
.build());
ctx.export("subgroups", subgroups);
}
}
variables:
subgroups:
fn::invoke:
function: gitlab:getGroupSubgroups
arguments:
groupId: '123456'
outputs:
subgroups: ${subgroups}
Using getGroupSubgroups
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 getGroupSubgroups(args: GetGroupSubgroupsArgs, opts?: InvokeOptions): Promise<GetGroupSubgroupsResult>
function getGroupSubgroupsOutput(args: GetGroupSubgroupsOutputArgs, opts?: InvokeOptions): Output<GetGroupSubgroupsResult>def get_group_subgroups(all_available: Optional[bool] = None,
group_id: Optional[int] = None,
min_access_level: Optional[str] = None,
order_by: Optional[str] = None,
owned: Optional[bool] = None,
search: Optional[str] = None,
skip_groups: Optional[Sequence[int]] = None,
sort: Optional[str] = None,
statistics: Optional[bool] = None,
with_custom_attributes: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetGroupSubgroupsResult
def get_group_subgroups_output(all_available: Optional[pulumi.Input[bool]] = None,
group_id: Optional[pulumi.Input[int]] = None,
min_access_level: Optional[pulumi.Input[str]] = None,
order_by: Optional[pulumi.Input[str]] = None,
owned: Optional[pulumi.Input[bool]] = None,
search: Optional[pulumi.Input[str]] = None,
skip_groups: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
sort: Optional[pulumi.Input[str]] = None,
statistics: Optional[pulumi.Input[bool]] = None,
with_custom_attributes: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetGroupSubgroupsResult]func GetGroupSubgroups(ctx *Context, args *GetGroupSubgroupsArgs, opts ...InvokeOption) (*GetGroupSubgroupsResult, error)
func GetGroupSubgroupsOutput(ctx *Context, args *GetGroupSubgroupsOutputArgs, opts ...InvokeOption) GetGroupSubgroupsResultOutput> Note: This function is named GetGroupSubgroups in the Go SDK.
public static class GetGroupSubgroups
{
public static Task<GetGroupSubgroupsResult> InvokeAsync(GetGroupSubgroupsArgs args, InvokeOptions? opts = null)
public static Output<GetGroupSubgroupsResult> Invoke(GetGroupSubgroupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGroupSubgroupsResult> getGroupSubgroups(GetGroupSubgroupsArgs args, InvokeOptions options)
public static Output<GetGroupSubgroupsResult> getGroupSubgroups(GetGroupSubgroupsArgs args, InvokeOptions options)
fn::invoke:
function: gitlab:index/getGroupSubgroups:getGroupSubgroups
arguments:
# arguments dictionaryThe following arguments are supported:
- Group
Id int - The ID of the group.
- All
Available bool - Show all the groups you have access to.
- Min
Access stringLevel - Limit to groups where current user has at least this access level.
- Order
By string - Order groups by name, path or id.
- Owned bool
- Limit to groups explicitly owned by the current user.
- Search string
- Return the list of authorized groups matching the search criteria.
- Skip
Groups List<int> - Skip the group IDs passed.
- Sort string
- Order groups in asc or desc order.
- Statistics bool
- Include group statistics (administrators only).
- With
Custom boolAttributes - Include custom attributes in response (administrators only).
- Group
Id int - The ID of the group.
- All
Available bool - Show all the groups you have access to.
- Min
Access stringLevel - Limit to groups where current user has at least this access level.
- Order
By string - Order groups by name, path or id.
- Owned bool
- Limit to groups explicitly owned by the current user.
- Search string
- Return the list of authorized groups matching the search criteria.
- Skip
Groups []int - Skip the group IDs passed.
- Sort string
- Order groups in asc or desc order.
- Statistics bool
- Include group statistics (administrators only).
- With
Custom boolAttributes - Include custom attributes in response (administrators only).
- group
Id Integer - The ID of the group.
- all
Available Boolean - Show all the groups you have access to.
- min
Access StringLevel - Limit to groups where current user has at least this access level.
- order
By String - Order groups by name, path or id.
- owned Boolean
- Limit to groups explicitly owned by the current user.
- search String
- Return the list of authorized groups matching the search criteria.
- skip
Groups List<Integer> - Skip the group IDs passed.
- sort String
- Order groups in asc or desc order.
- statistics Boolean
- Include group statistics (administrators only).
- with
Custom BooleanAttributes - Include custom attributes in response (administrators only).
- group
Id number - The ID of the group.
- all
Available boolean - Show all the groups you have access to.
- min
Access stringLevel - Limit to groups where current user has at least this access level.
- order
By string - Order groups by name, path or id.
- owned boolean
- Limit to groups explicitly owned by the current user.
- search string
- Return the list of authorized groups matching the search criteria.
- skip
Groups number[] - Skip the group IDs passed.
- sort string
- Order groups in asc or desc order.
- statistics boolean
- Include group statistics (administrators only).
- with
Custom booleanAttributes - Include custom attributes in response (administrators only).
- group_
id int - The ID of the group.
- all_
available bool - Show all the groups you have access to.
- min_
access_ strlevel - Limit to groups where current user has at least this access level.
- order_
by str - Order groups by name, path or id.
- owned bool
- Limit to groups explicitly owned by the current user.
- search str
- Return the list of authorized groups matching the search criteria.
- skip_
groups Sequence[int] - Skip the group IDs passed.
- sort str
- Order groups in asc or desc order.
- statistics bool
- Include group statistics (administrators only).
- with_
custom_ boolattributes - Include custom attributes in response (administrators only).
- group
Id Number - The ID of the group.
- all
Available Boolean - Show all the groups you have access to.
- min
Access StringLevel - Limit to groups where current user has at least this access level.
- order
By String - Order groups by name, path or id.
- owned Boolean
- Limit to groups explicitly owned by the current user.
- search String
- Return the list of authorized groups matching the search criteria.
- skip
Groups List<Number> - Skip the group IDs passed.
- sort String
- Order groups in asc or desc order.
- statistics Boolean
- Include group statistics (administrators only).
- with
Custom BooleanAttributes - Include custom attributes in response (administrators only).
getGroupSubgroups Result
The following output properties are available:
- All
Available bool - Show all the groups you have access to.
- Group
Id int - The ID of the group.
- Id string
- The ID of this datasource. In the format
<group-id>. - Min
Access stringLevel - Limit to groups where current user has at least this access level.
- Order
By string - Order groups by name, path or id.
- Owned bool
- Limit to groups explicitly owned by the current user.
- Search string
- Return the list of authorized groups matching the search criteria.
- Skip
Groups List<int> - Skip the group IDs passed.
- Sort string
- Order groups in asc or desc order.
- Statistics bool
- Include group statistics (administrators only).
- Subgroups
List<Pulumi.
Git Lab. Outputs. Get Group Subgroups Subgroup> - Subgroups of the parent group.
- With
Custom boolAttributes - Include custom attributes in response (administrators only).
- All
Available bool - Show all the groups you have access to.
- Group
Id int - The ID of the group.
- Id string
- The ID of this datasource. In the format
<group-id>. - Min
Access stringLevel - Limit to groups where current user has at least this access level.
- Order
By string - Order groups by name, path or id.
- Owned bool
- Limit to groups explicitly owned by the current user.
- Search string
- Return the list of authorized groups matching the search criteria.
- Skip
Groups []int - Skip the group IDs passed.
- Sort string
- Order groups in asc or desc order.
- Statistics bool
- Include group statistics (administrators only).
- Subgroups
[]Get
Group Subgroups Subgroup - Subgroups of the parent group.
- With
Custom boolAttributes - Include custom attributes in response (administrators only).
- all
Available Boolean - Show all the groups you have access to.
- group
Id Integer - The ID of the group.
- id String
- The ID of this datasource. In the format
<group-id>. - min
Access StringLevel - Limit to groups where current user has at least this access level.
- order
By String - Order groups by name, path or id.
- owned Boolean
- Limit to groups explicitly owned by the current user.
- search String
- Return the list of authorized groups matching the search criteria.
- skip
Groups List<Integer> - Skip the group IDs passed.
- sort String
- Order groups in asc or desc order.
- statistics Boolean
- Include group statistics (administrators only).
- subgroups
List<Get
Group Subgroups Subgroup> - Subgroups of the parent group.
- with
Custom BooleanAttributes - Include custom attributes in response (administrators only).
- all
Available boolean - Show all the groups you have access to.
- group
Id number - The ID of the group.
- id string
- The ID of this datasource. In the format
<group-id>. - min
Access stringLevel - Limit to groups where current user has at least this access level.
- order
By string - Order groups by name, path or id.
- owned boolean
- Limit to groups explicitly owned by the current user.
- search string
- Return the list of authorized groups matching the search criteria.
- skip
Groups number[] - Skip the group IDs passed.
- sort string
- Order groups in asc or desc order.
- statistics boolean
- Include group statistics (administrators only).
- subgroups
Get
Group Subgroups Subgroup[] - Subgroups of the parent group.
- with
Custom booleanAttributes - Include custom attributes in response (administrators only).
- all_
available bool - Show all the groups you have access to.
- group_
id int - The ID of the group.
- id str
- The ID of this datasource. In the format
<group-id>. - min_
access_ strlevel - Limit to groups where current user has at least this access level.
- order_
by str - Order groups by name, path or id.
- owned bool
- Limit to groups explicitly owned by the current user.
- search str
- Return the list of authorized groups matching the search criteria.
- skip_
groups Sequence[int] - Skip the group IDs passed.
- sort str
- Order groups in asc or desc order.
- statistics bool
- Include group statistics (administrators only).
- subgroups
Sequence[Get
Group Subgroups Subgroup] - Subgroups of the parent group.
- with_
custom_ boolattributes - Include custom attributes in response (administrators only).
- all
Available Boolean - Show all the groups you have access to.
- group
Id Number - The ID of the group.
- id String
- The ID of this datasource. In the format
<group-id>. - min
Access StringLevel - Limit to groups where current user has at least this access level.
- order
By String - Order groups by name, path or id.
- owned Boolean
- Limit to groups explicitly owned by the current user.
- search String
- Return the list of authorized groups matching the search criteria.
- skip
Groups List<Number> - Skip the group IDs passed.
- sort String
- Order groups in asc or desc order.
- statistics Boolean
- Include group statistics (administrators only).
- subgroups List<Property Map>
- Subgroups of the parent group.
- with
Custom BooleanAttributes - Include custom attributes in response (administrators only).
Supporting Types
GetGroupSubgroupsSubgroup
- Allowed
Email stringDomains List - A list of email address domains to allow group access.
- Auto
Devops boolEnabled - Default to Auto DevOps pipeline for all projects within this group.
- Avatar
Url string - The URL of the avatar image.
- Created
At string - Group created at date.
- Default
Branch intProtection - Whether developers and maintainers can push to the applicable default branch.
- Description string
- The description of the group.
- Emails
Enabled bool - Enable email notifications.
- File
Template intProject Id - The ID of the project that will be used for file templates.
- Full
Name string - The full name of the group.
- Full
Path string - The full path of the group.
- Group
Id int - The ID of the group.
- Ip
Restriction stringRanges - A list of IP addresses or subnet masks to restrict group access.
- Lfs
Enabled bool - Is LFS enabled for projects in this group.
- Mentions
Disabled bool - Disable the capability of a group from getting mentioned.
- Name string
- The name of this group.
- Parent
Id int - ID of the parent group.
- Path string
- The path of the group.
- Project
Creation stringLevel - Determine if developers can create projects in the group. Valid values are:
noone,owner,maintainer,developer,administrator - Request
Access boolEnabled - Is request for access enabled to the group.
- Require
Two boolFactor Authentication - Require all users in this group to setup Two-factor authentication.
- bool
- Prevent sharing a project with another group within this group.
- string
- Enable or disable shared runners for a group's subgroups and projects. Valid values are:
enabled,disabled_and_overridable,disabled_and_unoverridable,disabled_with_override. - Statistics Dictionary<string, string>
- Group statistics.
- Subgroup
Creation stringLevel - Allowed to create subgroups. Valid values are:
owner,maintainer. - Two
Factor intGrace Period - Time before Two-factor authentication is enforced (in hours).
- Visibility string
- Limited by visibility
public,internal, orprivate. - Web
Url string - Web URL of the group.
- Wiki
Access stringLevel - The group's wiki access level. Only available on Premium and Ultimate plans. Valid values are
disabled,private,enabled.
- Allowed
Email stringDomains List - A list of email address domains to allow group access.
- Auto
Devops boolEnabled - Default to Auto DevOps pipeline for all projects within this group.
- Avatar
Url string - The URL of the avatar image.
- Created
At string - Group created at date.
- Default
Branch intProtection - Whether developers and maintainers can push to the applicable default branch.
- Description string
- The description of the group.
- Emails
Enabled bool - Enable email notifications.
- File
Template intProject Id - The ID of the project that will be used for file templates.
- Full
Name string - The full name of the group.
- Full
Path string - The full path of the group.
- Group
Id int - The ID of the group.
- Ip
Restriction stringRanges - A list of IP addresses or subnet masks to restrict group access.
- Lfs
Enabled bool - Is LFS enabled for projects in this group.
- Mentions
Disabled bool - Disable the capability of a group from getting mentioned.
- Name string
- The name of this group.
- Parent
Id int - ID of the parent group.
- Path string
- The path of the group.
- Project
Creation stringLevel - Determine if developers can create projects in the group. Valid values are:
noone,owner,maintainer,developer,administrator - Request
Access boolEnabled - Is request for access enabled to the group.
- Require
Two boolFactor Authentication - Require all users in this group to setup Two-factor authentication.
- bool
- Prevent sharing a project with another group within this group.
- string
- Enable or disable shared runners for a group's subgroups and projects. Valid values are:
enabled,disabled_and_overridable,disabled_and_unoverridable,disabled_with_override. - Statistics map[string]string
- Group statistics.
- Subgroup
Creation stringLevel - Allowed to create subgroups. Valid values are:
owner,maintainer. - Two
Factor intGrace Period - Time before Two-factor authentication is enforced (in hours).
- Visibility string
- Limited by visibility
public,internal, orprivate. - Web
Url string - Web URL of the group.
- Wiki
Access stringLevel - The group's wiki access level. Only available on Premium and Ultimate plans. Valid values are
disabled,private,enabled.
- allowed
Email StringDomains List - A list of email address domains to allow group access.
- auto
Devops BooleanEnabled - Default to Auto DevOps pipeline for all projects within this group.
- avatar
Url String - The URL of the avatar image.
- created
At String - Group created at date.
- default
Branch IntegerProtection - Whether developers and maintainers can push to the applicable default branch.
- description String
- The description of the group.
- emails
Enabled Boolean - Enable email notifications.
- file
Template IntegerProject Id - The ID of the project that will be used for file templates.
- full
Name String - The full name of the group.
- full
Path String - The full path of the group.
- group
Id Integer - The ID of the group.
- ip
Restriction StringRanges - A list of IP addresses or subnet masks to restrict group access.
- lfs
Enabled Boolean - Is LFS enabled for projects in this group.
- mentions
Disabled Boolean - Disable the capability of a group from getting mentioned.
- name String
- The name of this group.
- parent
Id Integer - ID of the parent group.
- path String
- The path of the group.
- project
Creation StringLevel - Determine if developers can create projects in the group. Valid values are:
noone,owner,maintainer,developer,administrator - request
Access BooleanEnabled - Is request for access enabled to the group.
- require
Two BooleanFactor Authentication - Require all users in this group to setup Two-factor authentication.
- Boolean
- Prevent sharing a project with another group within this group.
- String
- Enable or disable shared runners for a group's subgroups and projects. Valid values are:
enabled,disabled_and_overridable,disabled_and_unoverridable,disabled_with_override. - statistics Map<String,String>
- Group statistics.
- subgroup
Creation StringLevel - Allowed to create subgroups. Valid values are:
owner,maintainer. - two
Factor IntegerGrace Period - Time before Two-factor authentication is enforced (in hours).
- visibility String
- Limited by visibility
public,internal, orprivate. - web
Url String - Web URL of the group.
- wiki
Access StringLevel - The group's wiki access level. Only available on Premium and Ultimate plans. Valid values are
disabled,private,enabled.
- allowed
Email stringDomains List - A list of email address domains to allow group access.
- auto
Devops booleanEnabled - Default to Auto DevOps pipeline for all projects within this group.
- avatar
Url string - The URL of the avatar image.
- created
At string - Group created at date.
- default
Branch numberProtection - Whether developers and maintainers can push to the applicable default branch.
- description string
- The description of the group.
- emails
Enabled boolean - Enable email notifications.
- file
Template numberProject Id - The ID of the project that will be used for file templates.
- full
Name string - The full name of the group.
- full
Path string - The full path of the group.
- group
Id number - The ID of the group.
- ip
Restriction stringRanges - A list of IP addresses or subnet masks to restrict group access.
- lfs
Enabled boolean - Is LFS enabled for projects in this group.
- mentions
Disabled boolean - Disable the capability of a group from getting mentioned.
- name string
- The name of this group.
- parent
Id number - ID of the parent group.
- path string
- The path of the group.
- project
Creation stringLevel - Determine if developers can create projects in the group. Valid values are:
noone,owner,maintainer,developer,administrator - request
Access booleanEnabled - Is request for access enabled to the group.
- require
Two booleanFactor Authentication - Require all users in this group to setup Two-factor authentication.
- boolean
- Prevent sharing a project with another group within this group.
- string
- Enable or disable shared runners for a group's subgroups and projects. Valid values are:
enabled,disabled_and_overridable,disabled_and_unoverridable,disabled_with_override. - statistics {[key: string]: string}
- Group statistics.
- subgroup
Creation stringLevel - Allowed to create subgroups. Valid values are:
owner,maintainer. - two
Factor numberGrace Period - Time before Two-factor authentication is enforced (in hours).
- visibility string
- Limited by visibility
public,internal, orprivate. - web
Url string - Web URL of the group.
- wiki
Access stringLevel - The group's wiki access level. Only available on Premium and Ultimate plans. Valid values are
disabled,private,enabled.
- allowed_
email_ strdomains_ list - A list of email address domains to allow group access.
- auto_
devops_ boolenabled - Default to Auto DevOps pipeline for all projects within this group.
- avatar_
url str - The URL of the avatar image.
- created_
at str - Group created at date.
- default_
branch_ intprotection - Whether developers and maintainers can push to the applicable default branch.
- description str
- The description of the group.
- emails_
enabled bool - Enable email notifications.
- file_
template_ intproject_ id - The ID of the project that will be used for file templates.
- full_
name str - The full name of the group.
- full_
path str - The full path of the group.
- group_
id int - The ID of the group.
- ip_
restriction_ strranges - A list of IP addresses or subnet masks to restrict group access.
- lfs_
enabled bool - Is LFS enabled for projects in this group.
- mentions_
disabled bool - Disable the capability of a group from getting mentioned.
- name str
- The name of this group.
- parent_
id int - ID of the parent group.
- path str
- The path of the group.
- project_
creation_ strlevel - Determine if developers can create projects in the group. Valid values are:
noone,owner,maintainer,developer,administrator - request_
access_ boolenabled - Is request for access enabled to the group.
- require_
two_ boolfactor_ authentication - Require all users in this group to setup Two-factor authentication.
- bool
- Prevent sharing a project with another group within this group.
- str
- Enable or disable shared runners for a group's subgroups and projects. Valid values are:
enabled,disabled_and_overridable,disabled_and_unoverridable,disabled_with_override. - statistics Mapping[str, str]
- Group statistics.
- subgroup_
creation_ strlevel - Allowed to create subgroups. Valid values are:
owner,maintainer. - two_
factor_ intgrace_ period - Time before Two-factor authentication is enforced (in hours).
- visibility str
- Limited by visibility
public,internal, orprivate. - web_
url str - Web URL of the group.
- wiki_
access_ strlevel - The group's wiki access level. Only available on Premium and Ultimate plans. Valid values are
disabled,private,enabled.
- allowed
Email StringDomains List - A list of email address domains to allow group access.
- auto
Devops BooleanEnabled - Default to Auto DevOps pipeline for all projects within this group.
- avatar
Url String - The URL of the avatar image.
- created
At String - Group created at date.
- default
Branch NumberProtection - Whether developers and maintainers can push to the applicable default branch.
- description String
- The description of the group.
- emails
Enabled Boolean - Enable email notifications.
- file
Template NumberProject Id - The ID of the project that will be used for file templates.
- full
Name String - The full name of the group.
- full
Path String - The full path of the group.
- group
Id Number - The ID of the group.
- ip
Restriction StringRanges - A list of IP addresses or subnet masks to restrict group access.
- lfs
Enabled Boolean - Is LFS enabled for projects in this group.
- mentions
Disabled Boolean - Disable the capability of a group from getting mentioned.
- name String
- The name of this group.
- parent
Id Number - ID of the parent group.
- path String
- The path of the group.
- project
Creation StringLevel - Determine if developers can create projects in the group. Valid values are:
noone,owner,maintainer,developer,administrator - request
Access BooleanEnabled - Is request for access enabled to the group.
- require
Two BooleanFactor Authentication - Require all users in this group to setup Two-factor authentication.
- Boolean
- Prevent sharing a project with another group within this group.
- String
- Enable or disable shared runners for a group's subgroups and projects. Valid values are:
enabled,disabled_and_overridable,disabled_and_unoverridable,disabled_with_override. - statistics Map<String>
- Group statistics.
- subgroup
Creation StringLevel - Allowed to create subgroups. Valid values are:
owner,maintainer. - two
Factor NumberGrace Period - Time before Two-factor authentication is enforced (in hours).
- visibility String
- Limited by visibility
public,internal, orprivate. - web
Url String - Web URL of the group.
- wiki
Access StringLevel - The group's wiki access level. Only available on Premium and Ultimate plans. Valid values are
disabled,private,enabled.
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlabTerraform Provider.
