1. Packages
  2. Packages
  3. HashiCorp Vault Provider
  4. API Docs
  5. identity
  6. getGroup
Viewing docs for HashiCorp Vault v7.8.0
published on Tuesday, Mar 31, 2026 by Pulumi
vault logo
Viewing docs for HashiCorp Vault v7.8.0
published on Tuesday, Mar 31, 2026 by Pulumi

    Lookup an Identity Group for Vault. The Identity secrets engine is the identity management solution for Vault. It internally maintains the clients who are recognized by Vault.

    Important All data provided in the resource configuration will be written in cleartext to state and plan files generated by Terraform, and will appear in the console output when Terraform runs. Protect these artifacts accordingly. See the main provider documentation for more details.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const group = vault.identity.getGroup({
        groupName: "user",
    });
    
    import pulumi
    import pulumi_vault as vault
    
    group = vault.identity.get_group(group_name="user")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v7/go/vault/identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := identity.LookupGroup(ctx, &identity.LookupGroupArgs{
    			GroupName: pulumi.StringRef("user"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var @group = Vault.Identity.GetGroup.Invoke(new()
        {
            GroupName = "user",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.identity.IdentityFunctions;
    import com.pulumi.vault.identity.inputs.GetGroupArgs;
    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 group = IdentityFunctions.getGroup(GetGroupArgs.builder()
                .groupName("user")
                .build());
    
        }
    }
    
    variables:
      group:
        fn::invoke:
          function: vault:identity:getGroup
          arguments:
            groupName: user
    
    Example coming soon!
    

    Required Vault Capabilities

    Use of this resource requires the create capability on /identity/lookup/group.

    Using getGroup

    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 getGroup(args: GetGroupArgs, opts?: InvokeOptions): Promise<GetGroupResult>
    function getGroupOutput(args: GetGroupOutputArgs, opts?: InvokeOptions): Output<GetGroupResult>
    def get_group(alias_id: Optional[str] = None,
                  alias_mount_accessor: Optional[str] = None,
                  alias_name: Optional[str] = None,
                  group_id: Optional[str] = None,
                  group_name: Optional[str] = None,
                  namespace: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetGroupResult
    def get_group_output(alias_id: pulumi.Input[Optional[str]] = None,
                  alias_mount_accessor: pulumi.Input[Optional[str]] = None,
                  alias_name: pulumi.Input[Optional[str]] = None,
                  group_id: pulumi.Input[Optional[str]] = None,
                  group_name: pulumi.Input[Optional[str]] = None,
                  namespace: pulumi.Input[Optional[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetGroupResult]
    func LookupGroup(ctx *Context, args *LookupGroupArgs, opts ...InvokeOption) (*LookupGroupResult, error)
    func LookupGroupOutput(ctx *Context, args *LookupGroupOutputArgs, opts ...InvokeOption) LookupGroupResultOutput

    > Note: This function is named LookupGroup in the Go SDK.

    public static class GetGroup 
    {
        public static Task<GetGroupResult> InvokeAsync(GetGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetGroupResult> Invoke(GetGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
    public static Output<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vault:identity/getGroup:getGroup
      arguments:
        # arguments dictionary
    data "vault_identity_getgroup" "name" {
        # arguments
    }

    The following arguments are supported:

    AliasId string
    ID of the alias.
    AliasMountAccessor string

    Accessor of the mount to which the alias belongs to. This should be supplied in conjunction with aliasName.

    The lookup criteria can be groupName, groupId, aliasId, or a combination of aliasName and aliasMountAccessor.

    AliasName string
    Name of the alias. This should be supplied in conjunction with aliasMountAccessor.
    GroupId string
    ID of the group.
    GroupName string
    Name of the group.
    Namespace string
    The namespace of the target resource. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    AliasId string
    ID of the alias.
    AliasMountAccessor string

    Accessor of the mount to which the alias belongs to. This should be supplied in conjunction with aliasName.

    The lookup criteria can be groupName, groupId, aliasId, or a combination of aliasName and aliasMountAccessor.

    AliasName string
    Name of the alias. This should be supplied in conjunction with aliasMountAccessor.
    GroupId string
    ID of the group.
    GroupName string
    Name of the group.
    Namespace string
    The namespace of the target resource. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    alias_id string
    ID of the alias.
    alias_mount_accessor string

    Accessor of the mount to which the alias belongs to. This should be supplied in conjunction with aliasName.

    The lookup criteria can be groupName, groupId, aliasId, or a combination of aliasName and aliasMountAccessor.

    alias_name string
    Name of the alias. This should be supplied in conjunction with aliasMountAccessor.
    group_id string
    ID of the group.
    group_name string
    Name of the group.
    namespace string
    The namespace of the target resource. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    aliasId String
    ID of the alias.
    aliasMountAccessor String

    Accessor of the mount to which the alias belongs to. This should be supplied in conjunction with aliasName.

    The lookup criteria can be groupName, groupId, aliasId, or a combination of aliasName and aliasMountAccessor.

    aliasName String
    Name of the alias. This should be supplied in conjunction with aliasMountAccessor.
    groupId String
    ID of the group.
    groupName String
    Name of the group.
    namespace String
    The namespace of the target resource. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    aliasId string
    ID of the alias.
    aliasMountAccessor string

    Accessor of the mount to which the alias belongs to. This should be supplied in conjunction with aliasName.

    The lookup criteria can be groupName, groupId, aliasId, or a combination of aliasName and aliasMountAccessor.

    aliasName string
    Name of the alias. This should be supplied in conjunction with aliasMountAccessor.
    groupId string
    ID of the group.
    groupName string
    Name of the group.
    namespace string
    The namespace of the target resource. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    alias_id str
    ID of the alias.
    alias_mount_accessor str

    Accessor of the mount to which the alias belongs to. This should be supplied in conjunction with aliasName.

    The lookup criteria can be groupName, groupId, aliasId, or a combination of aliasName and aliasMountAccessor.

    alias_name str
    Name of the alias. This should be supplied in conjunction with aliasMountAccessor.
    group_id str
    ID of the group.
    group_name str
    Name of the group.
    namespace str
    The namespace of the target resource. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    aliasId String
    ID of the alias.
    aliasMountAccessor String

    Accessor of the mount to which the alias belongs to. This should be supplied in conjunction with aliasName.

    The lookup criteria can be groupName, groupId, aliasId, or a combination of aliasName and aliasMountAccessor.

    aliasName String
    Name of the alias. This should be supplied in conjunction with aliasMountAccessor.
    groupId String
    ID of the group.
    groupName String
    Name of the group.
    namespace String
    The namespace of the target resource. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.

    getGroup Result

    The following output properties are available:

    AliasCanonicalId string
    Canonical ID of the Alias
    AliasCreationTime string
    Creation time of the Alias
    AliasId string
    AliasLastUpdateTime string
    Last update time of the alias
    AliasMergedFromCanonicalIds List<string>
    List of canonical IDs merged with this alias
    AliasMetadata Dictionary<string, string>
    Arbitrary metadata
    AliasMountAccessor string
    AliasMountPath string
    Authentication mount path which this alias belongs to
    AliasMountType string
    Authentication mount type which this alias belongs to
    AliasName string
    CreationTime string
    Creation timestamp of the group
    DataJson string
    A string containing the full data payload retrieved from Vault, serialized in JSON format.
    GroupId string
    GroupName string
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdateTime string
    Last updated time of the group
    MemberEntityIds List<string>
    List of Entity IDs which are members of this group
    MemberGroupIds List<string>
    List of Group IDs which are members of this group
    Metadata Dictionary<string, string>
    Arbitrary metadata
    ModifyIndex int
    Modify index of the group
    NamespaceId string
    Namespace of which the group is part of
    ParentGroupIds List<string>
    List of Group IDs which are parents of this group.
    Policies List<string>
    List of policies attached to the group
    Type string
    Type of group
    Namespace string
    AliasCanonicalId string
    Canonical ID of the Alias
    AliasCreationTime string
    Creation time of the Alias
    AliasId string
    AliasLastUpdateTime string
    Last update time of the alias
    AliasMergedFromCanonicalIds []string
    List of canonical IDs merged with this alias
    AliasMetadata map[string]string
    Arbitrary metadata
    AliasMountAccessor string
    AliasMountPath string
    Authentication mount path which this alias belongs to
    AliasMountType string
    Authentication mount type which this alias belongs to
    AliasName string
    CreationTime string
    Creation timestamp of the group
    DataJson string
    A string containing the full data payload retrieved from Vault, serialized in JSON format.
    GroupId string
    GroupName string
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdateTime string
    Last updated time of the group
    MemberEntityIds []string
    List of Entity IDs which are members of this group
    MemberGroupIds []string
    List of Group IDs which are members of this group
    Metadata map[string]string
    Arbitrary metadata
    ModifyIndex int
    Modify index of the group
    NamespaceId string
    Namespace of which the group is part of
    ParentGroupIds []string
    List of Group IDs which are parents of this group.
    Policies []string
    List of policies attached to the group
    Type string
    Type of group
    Namespace string
    alias_canonical_id string
    Canonical ID of the Alias
    alias_creation_time string
    Creation time of the Alias
    alias_id string
    alias_last_update_time string
    Last update time of the alias
    alias_merged_from_canonical_ids list(string)
    List of canonical IDs merged with this alias
    alias_metadata map(string)
    Arbitrary metadata
    alias_mount_accessor string
    alias_mount_path string
    Authentication mount path which this alias belongs to
    alias_mount_type string
    Authentication mount type which this alias belongs to
    alias_name string
    creation_time string
    Creation timestamp of the group
    data_json string
    A string containing the full data payload retrieved from Vault, serialized in JSON format.
    group_id string
    group_name string
    id string
    The provider-assigned unique ID for this managed resource.
    last_update_time string
    Last updated time of the group
    member_entity_ids list(string)
    List of Entity IDs which are members of this group
    member_group_ids list(string)
    List of Group IDs which are members of this group
    metadata map(string)
    Arbitrary metadata
    modify_index number
    Modify index of the group
    namespace_id string
    Namespace of which the group is part of
    parent_group_ids list(string)
    List of Group IDs which are parents of this group.
    policies list(string)
    List of policies attached to the group
    type string
    Type of group
    namespace string
    aliasCanonicalId String
    Canonical ID of the Alias
    aliasCreationTime String
    Creation time of the Alias
    aliasId String
    aliasLastUpdateTime String
    Last update time of the alias
    aliasMergedFromCanonicalIds List<String>
    List of canonical IDs merged with this alias
    aliasMetadata Map<String,String>
    Arbitrary metadata
    aliasMountAccessor String
    aliasMountPath String
    Authentication mount path which this alias belongs to
    aliasMountType String
    Authentication mount type which this alias belongs to
    aliasName String
    creationTime String
    Creation timestamp of the group
    dataJson String
    A string containing the full data payload retrieved from Vault, serialized in JSON format.
    groupId String
    groupName String
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdateTime String
    Last updated time of the group
    memberEntityIds List<String>
    List of Entity IDs which are members of this group
    memberGroupIds List<String>
    List of Group IDs which are members of this group
    metadata Map<String,String>
    Arbitrary metadata
    modifyIndex Integer
    Modify index of the group
    namespaceId String
    Namespace of which the group is part of
    parentGroupIds List<String>
    List of Group IDs which are parents of this group.
    policies List<String>
    List of policies attached to the group
    type String
    Type of group
    namespace String
    aliasCanonicalId string
    Canonical ID of the Alias
    aliasCreationTime string
    Creation time of the Alias
    aliasId string
    aliasLastUpdateTime string
    Last update time of the alias
    aliasMergedFromCanonicalIds string[]
    List of canonical IDs merged with this alias
    aliasMetadata {[key: string]: string}
    Arbitrary metadata
    aliasMountAccessor string
    aliasMountPath string
    Authentication mount path which this alias belongs to
    aliasMountType string
    Authentication mount type which this alias belongs to
    aliasName string
    creationTime string
    Creation timestamp of the group
    dataJson string
    A string containing the full data payload retrieved from Vault, serialized in JSON format.
    groupId string
    groupName string
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdateTime string
    Last updated time of the group
    memberEntityIds string[]
    List of Entity IDs which are members of this group
    memberGroupIds string[]
    List of Group IDs which are members of this group
    metadata {[key: string]: string}
    Arbitrary metadata
    modifyIndex number
    Modify index of the group
    namespaceId string
    Namespace of which the group is part of
    parentGroupIds string[]
    List of Group IDs which are parents of this group.
    policies string[]
    List of policies attached to the group
    type string
    Type of group
    namespace string
    alias_canonical_id str
    Canonical ID of the Alias
    alias_creation_time str
    Creation time of the Alias
    alias_id str
    alias_last_update_time str
    Last update time of the alias
    alias_merged_from_canonical_ids Sequence[str]
    List of canonical IDs merged with this alias
    alias_metadata Mapping[str, str]
    Arbitrary metadata
    alias_mount_accessor str
    alias_mount_path str
    Authentication mount path which this alias belongs to
    alias_mount_type str
    Authentication mount type which this alias belongs to
    alias_name str
    creation_time str
    Creation timestamp of the group
    data_json str
    A string containing the full data payload retrieved from Vault, serialized in JSON format.
    group_id str
    group_name str
    id str
    The provider-assigned unique ID for this managed resource.
    last_update_time str
    Last updated time of the group
    member_entity_ids Sequence[str]
    List of Entity IDs which are members of this group
    member_group_ids Sequence[str]
    List of Group IDs which are members of this group
    metadata Mapping[str, str]
    Arbitrary metadata
    modify_index int
    Modify index of the group
    namespace_id str
    Namespace of which the group is part of
    parent_group_ids Sequence[str]
    List of Group IDs which are parents of this group.
    policies Sequence[str]
    List of policies attached to the group
    type str
    Type of group
    namespace str
    aliasCanonicalId String
    Canonical ID of the Alias
    aliasCreationTime String
    Creation time of the Alias
    aliasId String
    aliasLastUpdateTime String
    Last update time of the alias
    aliasMergedFromCanonicalIds List<String>
    List of canonical IDs merged with this alias
    aliasMetadata Map<String>
    Arbitrary metadata
    aliasMountAccessor String
    aliasMountPath String
    Authentication mount path which this alias belongs to
    aliasMountType String
    Authentication mount type which this alias belongs to
    aliasName String
    creationTime String
    Creation timestamp of the group
    dataJson String
    A string containing the full data payload retrieved from Vault, serialized in JSON format.
    groupId String
    groupName String
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdateTime String
    Last updated time of the group
    memberEntityIds List<String>
    List of Entity IDs which are members of this group
    memberGroupIds List<String>
    List of Group IDs which are members of this group
    metadata Map<String>
    Arbitrary metadata
    modifyIndex Number
    Modify index of the group
    namespaceId String
    Namespace of which the group is part of
    parentGroupIds List<String>
    List of Group IDs which are parents of this group.
    policies List<String>
    List of policies attached to the group
    type String
    Type of group
    namespace String

    Package Details

    Repository
    Vault pulumi/pulumi-vault
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vault Terraform Provider.
    vault logo
    Viewing docs for HashiCorp Vault v7.8.0
    published on Tuesday, Mar 31, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.