published on Friday, May 22, 2026 by Pulumi
published on Friday, May 22, 2026 by Pulumi
Use this data source to get list of the Cloud Identity Group Memberships within a given Group.
https://cloud.google.com/identity/docs/concepts/overview#memberships
To get more information about GroupMembership, see:
- API documentation
- How-to Guides
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const members = gcp.cloudidentity.getGroupMemberships({
group: "groups/123eab45c6defghi",
});
import pulumi
import pulumi_gcp as gcp
members = gcp.cloudidentity.get_group_memberships(group="groups/123eab45c6defghi")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/cloudidentity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudidentity.GetGroupMemberships(ctx, &cloudidentity.GetGroupMembershipsArgs{
Group: "groups/123eab45c6defghi",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var members = Gcp.CloudIdentity.GetGroupMemberships.Invoke(new()
{
Group = "groups/123eab45c6defghi",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudidentity.CloudidentityFunctions;
import com.pulumi.gcp.cloudidentity.inputs.GetGroupMembershipsArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 members = CloudidentityFunctions.getGroupMemberships(GetGroupMembershipsArgs.builder()
.group("groups/123eab45c6defghi")
.build());
}
}
variables:
members:
fn::invoke:
function: gcp:cloudidentity:getGroupMemberships
arguments:
group: groups/123eab45c6defghi
Example coming soon!
Using getGroupMemberships
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 getGroupMemberships(args: GetGroupMembershipsArgs, opts?: InvokeOptions): Promise<GetGroupMembershipsResult>
function getGroupMembershipsOutput(args: GetGroupMembershipsOutputArgs, opts?: InvokeOptions): Output<GetGroupMembershipsResult>def get_group_memberships(group: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetGroupMembershipsResult
def get_group_memberships_output(group: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetGroupMembershipsResult]func GetGroupMemberships(ctx *Context, args *GetGroupMembershipsArgs, opts ...InvokeOption) (*GetGroupMembershipsResult, error)
func GetGroupMembershipsOutput(ctx *Context, args *GetGroupMembershipsOutputArgs, opts ...InvokeOption) GetGroupMembershipsResultOutput> Note: This function is named GetGroupMemberships in the Go SDK.
public static class GetGroupMemberships
{
public static Task<GetGroupMembershipsResult> InvokeAsync(GetGroupMembershipsArgs args, InvokeOptions? opts = null)
public static Output<GetGroupMembershipsResult> Invoke(GetGroupMembershipsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGroupMembershipsResult> getGroupMemberships(GetGroupMembershipsArgs args, InvokeOptions options)
public static Output<GetGroupMembershipsResult> getGroupMemberships(GetGroupMembershipsArgs args, InvokeOptions options)
fn::invoke:
function: gcp:cloudidentity/getGroupMemberships:getGroupMemberships
arguments:
# arguments dictionarydata "gcp_cloudidentity_getgroupmemberships" "name" {
# arguments
}The following arguments are supported:
- Group string
- The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.
- Group string
- The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.
- group string
- The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.
- group String
- The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.
- group string
- The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.
- group str
- The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.
- group String
- The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.
getGroupMemberships Result
The following output properties are available:
- Group string
- Id string
- The provider-assigned unique ID for this managed resource.
- Memberships
List<Get
Group Memberships Membership> - The list of memberships under the given group. Structure is documented below.
- Group string
- Id string
- The provider-assigned unique ID for this managed resource.
- Memberships
[]Get
Group Memberships Membership - The list of memberships under the given group. Structure is documented below.
- group string
- id string
- The provider-assigned unique ID for this managed resource.
- memberships list(object)
- The list of memberships under the given group. Structure is documented below.
- group String
- id String
- The provider-assigned unique ID for this managed resource.
- memberships
List<Get
Group Memberships Membership> - The list of memberships under the given group. Structure is documented below.
- group string
- id string
- The provider-assigned unique ID for this managed resource.
- memberships
Get
Group Memberships Membership[] - The list of memberships under the given group. Structure is documented below.
- group str
- id str
- The provider-assigned unique ID for this managed resource.
- memberships
Sequence[Get
Group Memberships Membership] - The list of memberships under the given group. Structure is documented below.
- group String
- id String
- The provider-assigned unique ID for this managed resource.
- memberships List<Property Map>
- The list of memberships under the given group. Structure is documented below.
Supporting Types
GetGroupMembershipsMembership
- Create
Ignore boolAlready Exists - If set to true, skip group member creation if a membership with the same name already exists. Defaults to false.
- Create
Time string - The time when the Membership was created.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the instance. Defaults to "DELETE". When a 'terraform destroy' or 'terraform apply' would delete the instance, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Group string
- The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.
- Member
Keys List<GetGroup Memberships Membership Member Key> - EntityKey of the member. Structure is documented below.
- Name string
- The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.
- Preferred
Member List<GetKeys Group Memberships Membership Preferred Member Key> - EntityKey of the member. Structure is documented below.
- Roles
List<Get
Group Memberships Membership Role> - The MembershipRoles that apply to the Membership. Structure is documented below.
- Type string
- The type of the membership.
- Update
Time string - The time when the Membership was last updated.
- Create
Ignore boolAlready Exists - If set to true, skip group member creation if a membership with the same name already exists. Defaults to false.
- Create
Time string - The time when the Membership was created.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the instance. Defaults to "DELETE". When a 'terraform destroy' or 'terraform apply' would delete the instance, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Group string
- The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.
- Member
Keys []GetGroup Memberships Membership Member Key - EntityKey of the member. Structure is documented below.
- Name string
- The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.
- Preferred
Member []GetKeys Group Memberships Membership Preferred Member Key - EntityKey of the member. Structure is documented below.
- Roles
[]Get
Group Memberships Membership Role - The MembershipRoles that apply to the Membership. Structure is documented below.
- Type string
- The type of the membership.
- Update
Time string - The time when the Membership was last updated.
- create_
ignore_ boolalready_ exists - If set to true, skip group member creation if a membership with the same name already exists. Defaults to false.
- create_
time string - The time when the Membership was created.
- deletion_
policy string - Whether Terraform will be prevented from destroying the instance. Defaults to "DELETE". When a 'terraform destroy' or 'terraform apply' would delete the instance, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- group string
- The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.
- member_
keys list(object) - EntityKey of the member. Structure is documented below.
- name string
- The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.
- preferred_
member_ list(object)keys - EntityKey of the member. Structure is documented below.
- roles list(object)
- The MembershipRoles that apply to the Membership. Structure is documented below.
- type string
- The type of the membership.
- update_
time string - The time when the Membership was last updated.
- create
Ignore BooleanAlready Exists - If set to true, skip group member creation if a membership with the same name already exists. Defaults to false.
- create
Time String - The time when the Membership was created.
- deletion
Policy String - Whether Terraform will be prevented from destroying the instance. Defaults to "DELETE". When a 'terraform destroy' or 'terraform apply' would delete the instance, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- group String
- The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.
- member
Keys List<GetGroup Memberships Membership Member Key> - EntityKey of the member. Structure is documented below.
- name String
- The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.
- preferred
Member List<GetKeys Group Memberships Membership Preferred Member Key> - EntityKey of the member. Structure is documented below.
- roles
List<Get
Group Memberships Membership Role> - The MembershipRoles that apply to the Membership. Structure is documented below.
- type String
- The type of the membership.
- update
Time String - The time when the Membership was last updated.
- create
Ignore booleanAlready Exists - If set to true, skip group member creation if a membership with the same name already exists. Defaults to false.
- create
Time string - The time when the Membership was created.
- deletion
Policy string - Whether Terraform will be prevented from destroying the instance. Defaults to "DELETE". When a 'terraform destroy' or 'terraform apply' would delete the instance, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- group string
- The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.
- member
Keys GetGroup Memberships Membership Member Key[] - EntityKey of the member. Structure is documented below.
- name string
- The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.
- preferred
Member GetKeys Group Memberships Membership Preferred Member Key[] - EntityKey of the member. Structure is documented below.
- roles
Get
Group Memberships Membership Role[] - The MembershipRoles that apply to the Membership. Structure is documented below.
- type string
- The type of the membership.
- update
Time string - The time when the Membership was last updated.
- create_
ignore_ boolalready_ exists - If set to true, skip group member creation if a membership with the same name already exists. Defaults to false.
- create_
time str - The time when the Membership was created.
- deletion_
policy str - Whether Terraform will be prevented from destroying the instance. Defaults to "DELETE". When a 'terraform destroy' or 'terraform apply' would delete the instance, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- group str
- The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.
- member_
keys Sequence[GetGroup Memberships Membership Member Key] - EntityKey of the member. Structure is documented below.
- name str
- The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.
- preferred_
member_ Sequence[Getkeys Group Memberships Membership Preferred Member Key] - EntityKey of the member. Structure is documented below.
- roles
Sequence[Get
Group Memberships Membership Role] - The MembershipRoles that apply to the Membership. Structure is documented below.
- type str
- The type of the membership.
- update_
time str - The time when the Membership was last updated.
- create
Ignore BooleanAlready Exists - If set to true, skip group member creation if a membership with the same name already exists. Defaults to false.
- create
Time String - The time when the Membership was created.
- deletion
Policy String - Whether Terraform will be prevented from destroying the instance. Defaults to "DELETE". When a 'terraform destroy' or 'terraform apply' would delete the instance, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- group String
- The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.
- member
Keys List<Property Map> - EntityKey of the member. Structure is documented below.
- name String
- The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.
- preferred
Member List<Property Map>Keys - EntityKey of the member. Structure is documented below.
- roles List<Property Map>
- The MembershipRoles that apply to the Membership. Structure is documented below.
- type String
- The type of the membership.
- update
Time String - The time when the Membership was last updated.
GetGroupMembershipsMembershipMemberKey
- Id string
- The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.
- Namespace string
- The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group.
- Id string
- The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.
- Namespace string
- The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group.
- id string
- The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.
- namespace string
- The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group.
- id String
- The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.
- namespace String
- The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group.
- id string
- The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.
- namespace string
- The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group.
- id str
- The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.
- namespace str
- The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group.
- id String
- The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.
- namespace String
- The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group.
GetGroupMembershipsMembershipPreferredMemberKey
- Id string
- The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.
- Namespace string
- The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group.
- Id string
- The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.
- Namespace string
- The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group.
- id string
- The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.
- namespace string
- The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group.
- id String
- The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.
- namespace String
- The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group.
- id string
- The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.
- namespace string
- The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group.
- id str
- The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.
- namespace str
- The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group.
- id String
- The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.
- namespace String
- The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group.
GetGroupMembershipsMembershipRole
- Expiry
Details List<GetGroup Memberships Membership Role Expiry Detail> - The MembershipRole expiry details, only supported for MEMBER role. Other roles cannot be accompanied with MEMBER role having expiry.
- Name string
- The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.
- Expiry
Details []GetGroup Memberships Membership Role Expiry Detail - The MembershipRole expiry details, only supported for MEMBER role. Other roles cannot be accompanied with MEMBER role having expiry.
- Name string
- The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.
- expiry_
details list(object) - The MembershipRole expiry details, only supported for MEMBER role. Other roles cannot be accompanied with MEMBER role having expiry.
- name string
- The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.
- expiry
Details List<GetGroup Memberships Membership Role Expiry Detail> - The MembershipRole expiry details, only supported for MEMBER role. Other roles cannot be accompanied with MEMBER role having expiry.
- name String
- The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.
- expiry
Details GetGroup Memberships Membership Role Expiry Detail[] - The MembershipRole expiry details, only supported for MEMBER role. Other roles cannot be accompanied with MEMBER role having expiry.
- name string
- The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.
- expiry_
details Sequence[GetGroup Memberships Membership Role Expiry Detail] - The MembershipRole expiry details, only supported for MEMBER role. Other roles cannot be accompanied with MEMBER role having expiry.
- name str
- The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.
- expiry
Details List<Property Map> - The MembershipRole expiry details, only supported for MEMBER role. Other roles cannot be accompanied with MEMBER role having expiry.
- name String
- The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.
GetGroupMembershipsMembershipRoleExpiryDetail
- Expire
Time string The time at which the MembershipRole will expire.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- Expire
Time string The time at which the MembershipRole will expire.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- expire_
time string The time at which the MembershipRole will expire.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- expire
Time String The time at which the MembershipRole will expire.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- expire
Time string The time at which the MembershipRole will expire.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- expire_
time str The time at which the MembershipRole will expire.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- expire
Time String The time at which the MembershipRole will expire.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
published on Friday, May 22, 2026 by Pulumi