1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. identity
  5. GroupMemberGroupIds
HashiCorp Vault v5.15.0 published on Friday, Sep 8, 2023 by Pulumi

vault.identity.GroupMemberGroupIds

Explore with Pulumi AI

vault logo
HashiCorp Vault v5.15.0 published on Friday, Sep 8, 2023 by Pulumi

    Manages member groups for an Identity Group for Vault. The Identity secrets engine is the identity management solution for Vault.

    Example Usage

    Exclusive Member Groups

    using System.Collections.Generic;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var @internal = new Vault.Identity.Group("internal", new()
        {
            Type = "internal",
            ExternalMemberGroupIds = true,
            Metadata = 
            {
                { "version", "2" },
            },
        });
    
        var users = new Vault.Identity.Group("users", new()
        {
            Metadata = 
            {
                { "version", "2" },
            },
        });
    
        var members = new Vault.Identity.GroupMemberGroupIds("members", new()
        {
            Exclusive = true,
            MemberGroupIds = new[]
            {
                users.Id,
            },
            GroupId = @internal.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v5/go/vault/identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		internal, err := identity.NewGroup(ctx, "internal", &identity.GroupArgs{
    			Type:                   pulumi.String("internal"),
    			ExternalMemberGroupIds: pulumi.Bool(true),
    			Metadata: pulumi.StringMap{
    				"version": pulumi.String("2"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		users, err := identity.NewGroup(ctx, "users", &identity.GroupArgs{
    			Metadata: pulumi.StringMap{
    				"version": pulumi.String("2"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = identity.NewGroupMemberGroupIds(ctx, "members", &identity.GroupMemberGroupIdsArgs{
    			Exclusive: pulumi.Bool(true),
    			MemberGroupIds: pulumi.StringArray{
    				users.ID(),
    			},
    			GroupId: internal.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.identity.Group;
    import com.pulumi.vault.identity.GroupArgs;
    import com.pulumi.vault.identity.GroupMemberGroupIds;
    import com.pulumi.vault.identity.GroupMemberGroupIdsArgs;
    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 internal = new Group("internal", GroupArgs.builder()        
                .type("internal")
                .externalMemberGroupIds(true)
                .metadata(Map.of("version", "2"))
                .build());
    
            var users = new Group("users", GroupArgs.builder()        
                .metadata(Map.of("version", "2"))
                .build());
    
            var members = new GroupMemberGroupIds("members", GroupMemberGroupIdsArgs.builder()        
                .exclusive(true)
                .memberGroupIds(users.id())
                .groupId(internal.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_vault as vault
    
    internal = vault.identity.Group("internal",
        type="internal",
        external_member_group_ids=True,
        metadata={
            "version": "2",
        })
    users = vault.identity.Group("users", metadata={
        "version": "2",
    })
    members = vault.identity.GroupMemberGroupIds("members",
        exclusive=True,
        member_group_ids=[users.id],
        group_id=internal.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const internal = new vault.identity.Group("internal", {
        type: "internal",
        externalMemberGroupIds: true,
        metadata: {
            version: "2",
        },
    });
    const users = new vault.identity.Group("users", {metadata: {
        version: "2",
    }});
    const members = new vault.identity.GroupMemberGroupIds("members", {
        exclusive: true,
        memberGroupIds: [users.id],
        groupId: internal.id,
    });
    
    resources:
      internal:
        type: vault:identity:Group
        properties:
          type: internal
          externalMemberGroupIds: true
          metadata:
            version: 2
      users:
        type: vault:identity:Group
        properties:
          metadata:
            version: 2
      members:
        type: vault:identity:GroupMemberGroupIds
        properties:
          exclusive: true
          memberGroupIds:
            - ${users.id}
          groupId: ${internal.id}
    

    Non-Exclusive Member Groups

    using System.Collections.Generic;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var @internal = new Vault.Identity.Group("internal", new()
        {
            Type = "internal",
            ExternalMemberGroupIds = true,
            Metadata = 
            {
                { "version", "2" },
            },
        });
    
        var users = new Vault.Identity.Group("users", new()
        {
            Metadata = 
            {
                { "version", "2" },
            },
        });
    
        var members = new Vault.Identity.GroupMemberGroupIds("members", new()
        {
            Exclusive = false,
            MemberGroupIds = new[]
            {
                users.Id,
            },
            GroupId = @internal.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v5/go/vault/identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		internal, err := identity.NewGroup(ctx, "internal", &identity.GroupArgs{
    			Type:                   pulumi.String("internal"),
    			ExternalMemberGroupIds: pulumi.Bool(true),
    			Metadata: pulumi.StringMap{
    				"version": pulumi.String("2"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		users, err := identity.NewGroup(ctx, "users", &identity.GroupArgs{
    			Metadata: pulumi.StringMap{
    				"version": pulumi.String("2"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = identity.NewGroupMemberGroupIds(ctx, "members", &identity.GroupMemberGroupIdsArgs{
    			Exclusive: pulumi.Bool(false),
    			MemberGroupIds: pulumi.StringArray{
    				users.ID(),
    			},
    			GroupId: internal.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.identity.Group;
    import com.pulumi.vault.identity.GroupArgs;
    import com.pulumi.vault.identity.GroupMemberGroupIds;
    import com.pulumi.vault.identity.GroupMemberGroupIdsArgs;
    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 internal = new Group("internal", GroupArgs.builder()        
                .type("internal")
                .externalMemberGroupIds(true)
                .metadata(Map.of("version", "2"))
                .build());
    
            var users = new Group("users", GroupArgs.builder()        
                .metadata(Map.of("version", "2"))
                .build());
    
            var members = new GroupMemberGroupIds("members", GroupMemberGroupIdsArgs.builder()        
                .exclusive(false)
                .memberGroupIds(users.id())
                .groupId(internal.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_vault as vault
    
    internal = vault.identity.Group("internal",
        type="internal",
        external_member_group_ids=True,
        metadata={
            "version": "2",
        })
    users = vault.identity.Group("users", metadata={
        "version": "2",
    })
    members = vault.identity.GroupMemberGroupIds("members",
        exclusive=False,
        member_group_ids=[users.id],
        group_id=internal.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const internal = new vault.identity.Group("internal", {
        type: "internal",
        externalMemberGroupIds: true,
        metadata: {
            version: "2",
        },
    });
    const users = new vault.identity.Group("users", {metadata: {
        version: "2",
    }});
    const members = new vault.identity.GroupMemberGroupIds("members", {
        exclusive: false,
        memberGroupIds: [users.id],
        groupId: internal.id,
    });
    
    resources:
      internal:
        type: vault:identity:Group
        properties:
          type: internal
          externalMemberGroupIds: true
          metadata:
            version: 2
      users:
        type: vault:identity:Group
        properties:
          metadata:
            version: 2
      members:
        type: vault:identity:GroupMemberGroupIds
        properties:
          exclusive: false
          memberGroupIds:
            - ${users.id}
          groupId: ${internal.id}
    

    Create GroupMemberGroupIds Resource

    new GroupMemberGroupIds(name: string, args: GroupMemberGroupIdsArgs, opts?: CustomResourceOptions);
    @overload
    def GroupMemberGroupIds(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            exclusive: Optional[bool] = None,
                            group_id: Optional[str] = None,
                            member_group_ids: Optional[Sequence[str]] = None,
                            namespace: Optional[str] = None)
    @overload
    def GroupMemberGroupIds(resource_name: str,
                            args: GroupMemberGroupIdsArgs,
                            opts: Optional[ResourceOptions] = None)
    func NewGroupMemberGroupIds(ctx *Context, name string, args GroupMemberGroupIdsArgs, opts ...ResourceOption) (*GroupMemberGroupIds, error)
    public GroupMemberGroupIds(string name, GroupMemberGroupIdsArgs args, CustomResourceOptions? opts = null)
    public GroupMemberGroupIds(String name, GroupMemberGroupIdsArgs args)
    public GroupMemberGroupIds(String name, GroupMemberGroupIdsArgs args, CustomResourceOptions options)
    
    type: vault:identity:GroupMemberGroupIds
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args GroupMemberGroupIdsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args GroupMemberGroupIdsArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args GroupMemberGroupIdsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GroupMemberGroupIdsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GroupMemberGroupIdsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    GroupMemberGroupIds Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The GroupMemberGroupIds resource accepts the following input properties:

    GroupId string

    Group ID to assign member entities to.

    Exclusive bool

    Defaults to true.

    MemberGroupIds List<string>

    List of member groups that belong to the group

    Namespace string

    The namespace to provision the resource in. 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.

    GroupId string

    Group ID to assign member entities to.

    Exclusive bool

    Defaults to true.

    MemberGroupIds []string

    List of member groups that belong to the group

    Namespace string

    The namespace to provision the resource in. 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.

    groupId String

    Group ID to assign member entities to.

    exclusive Boolean

    Defaults to true.

    memberGroupIds List<String>

    List of member groups that belong to the group

    namespace String

    The namespace to provision the resource in. 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.

    groupId string

    Group ID to assign member entities to.

    exclusive boolean

    Defaults to true.

    memberGroupIds string[]

    List of member groups that belong to the group

    namespace string

    The namespace to provision the resource in. 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.

    group_id str

    Group ID to assign member entities to.

    exclusive bool

    Defaults to true.

    member_group_ids Sequence[str]

    List of member groups that belong to the group

    namespace str

    The namespace to provision the resource in. 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.

    groupId String

    Group ID to assign member entities to.

    exclusive Boolean

    Defaults to true.

    memberGroupIds List<String>

    List of member groups that belong to the group

    namespace String

    The namespace to provision the resource in. 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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the GroupMemberGroupIds resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing GroupMemberGroupIds Resource

    Get an existing GroupMemberGroupIds resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: GroupMemberGroupIdsState, opts?: CustomResourceOptions): GroupMemberGroupIds
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            exclusive: Optional[bool] = None,
            group_id: Optional[str] = None,
            member_group_ids: Optional[Sequence[str]] = None,
            namespace: Optional[str] = None) -> GroupMemberGroupIds
    func GetGroupMemberGroupIds(ctx *Context, name string, id IDInput, state *GroupMemberGroupIdsState, opts ...ResourceOption) (*GroupMemberGroupIds, error)
    public static GroupMemberGroupIds Get(string name, Input<string> id, GroupMemberGroupIdsState? state, CustomResourceOptions? opts = null)
    public static GroupMemberGroupIds get(String name, Output<String> id, GroupMemberGroupIdsState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Exclusive bool

    Defaults to true.

    GroupId string

    Group ID to assign member entities to.

    MemberGroupIds List<string>

    List of member groups that belong to the group

    Namespace string

    The namespace to provision the resource in. 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.

    Exclusive bool

    Defaults to true.

    GroupId string

    Group ID to assign member entities to.

    MemberGroupIds []string

    List of member groups that belong to the group

    Namespace string

    The namespace to provision the resource in. 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.

    exclusive Boolean

    Defaults to true.

    groupId String

    Group ID to assign member entities to.

    memberGroupIds List<String>

    List of member groups that belong to the group

    namespace String

    The namespace to provision the resource in. 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.

    exclusive boolean

    Defaults to true.

    groupId string

    Group ID to assign member entities to.

    memberGroupIds string[]

    List of member groups that belong to the group

    namespace string

    The namespace to provision the resource in. 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.

    exclusive bool

    Defaults to true.

    group_id str

    Group ID to assign member entities to.

    member_group_ids Sequence[str]

    List of member groups that belong to the group

    namespace str

    The namespace to provision the resource in. 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.

    exclusive Boolean

    Defaults to true.

    groupId String

    Group ID to assign member entities to.

    memberGroupIds List<String>

    List of member groups that belong to the group

    namespace String

    The namespace to provision the resource in. 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.

    Package Details

    Repository
    Vault pulumi/pulumi-vault
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the vault Terraform Provider.

    vault logo
    HashiCorp Vault v5.15.0 published on Friday, Sep 8, 2023 by Pulumi