1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. identity
  5. GroupMemberGroupIds
HashiCorp Vault v6.1.0 published on Thursday, Apr 4, 2024 by Pulumi

vault.identity.GroupMemberGroupIds

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.1.0 published on Thursday, Apr 4, 2024 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

    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,
    });
    
    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)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v6/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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    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 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());
    
        }
    }
    
    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

    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,
    });
    
    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)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v6/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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    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 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());
    
        }
    }
    
    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

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new GroupMemberGroupIds(name: string, args: GroupMemberGroupIdsArgs, opts?: CustomResourceOptions);
    @overload
    def GroupMemberGroupIds(resource_name: str,
                            args: GroupMemberGroupIdsArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def GroupMemberGroupIds(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            group_id: Optional[str] = None,
                            exclusive: Optional[bool] = None,
                            member_group_ids: Optional[Sequence[str]] = None,
                            namespace: Optional[str] = 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.
    
    

    Parameters

    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.

    Example

    The following reference example uses placeholder values for all input properties.

    var groupMemberGroupIdsResource = new Vault.Identity.GroupMemberGroupIds("groupMemberGroupIdsResource", new()
    {
        GroupId = "string",
        Exclusive = false,
        MemberGroupIds = new[]
        {
            "string",
        },
        Namespace = "string",
    });
    
    example, err := identity.NewGroupMemberGroupIds(ctx, "groupMemberGroupIdsResource", &identity.GroupMemberGroupIdsArgs{
    	GroupId:   pulumi.String("string"),
    	Exclusive: pulumi.Bool(false),
    	MemberGroupIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Namespace: pulumi.String("string"),
    })
    
    var groupMemberGroupIdsResource = new GroupMemberGroupIds("groupMemberGroupIdsResource", GroupMemberGroupIdsArgs.builder()        
        .groupId("string")
        .exclusive(false)
        .memberGroupIds("string")
        .namespace("string")
        .build());
    
    group_member_group_ids_resource = vault.identity.GroupMemberGroupIds("groupMemberGroupIdsResource",
        group_id="string",
        exclusive=False,
        member_group_ids=["string"],
        namespace="string")
    
    const groupMemberGroupIdsResource = new vault.identity.GroupMemberGroupIds("groupMemberGroupIdsResource", {
        groupId: "string",
        exclusive: false,
        memberGroupIds: ["string"],
        namespace: "string",
    });
    
    type: vault:identity:GroupMemberGroupIds
    properties:
        exclusive: false
        groupId: string
        memberGroupIds:
            - string
        namespace: string
    

    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.

    If true, this resource will take exclusive control of the member groups that belong to the group and will set it equal to what is specified in the resource.

    If set to false, this resource will simply ensure that the member groups specified in the resource are present in the group. When destroying the resource, the resource will ensure that the member groups specified in the resource are removed.

    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.

    If true, this resource will take exclusive control of the member groups that belong to the group and will set it equal to what is specified in the resource.

    If set to false, this resource will simply ensure that the member groups specified in the resource are present in the group. When destroying the resource, the resource will ensure that the member groups specified in the resource are removed.

    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.

    If true, this resource will take exclusive control of the member groups that belong to the group and will set it equal to what is specified in the resource.

    If set to false, this resource will simply ensure that the member groups specified in the resource are present in the group. When destroying the resource, the resource will ensure that the member groups specified in the resource are removed.

    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.

    If true, this resource will take exclusive control of the member groups that belong to the group and will set it equal to what is specified in the resource.

    If set to false, this resource will simply ensure that the member groups specified in the resource are present in the group. When destroying the resource, the resource will ensure that the member groups specified in the resource are removed.

    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.

    If true, this resource will take exclusive control of the member groups that belong to the group and will set it equal to what is specified in the resource.

    If set to false, this resource will simply ensure that the member groups specified in the resource are present in the group. When destroying the resource, the resource will ensure that the member groups specified in the resource are removed.

    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.

    If true, this resource will take exclusive control of the member groups that belong to the group and will set it equal to what is specified in the resource.

    If set to false, this resource will simply ensure that the member groups specified in the resource are present in the group. When destroying the resource, the resource will ensure that the member groups specified in the resource are removed.

    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.

    If true, this resource will take exclusive control of the member groups that belong to the group and will set it equal to what is specified in the resource.

    If set to false, this resource will simply ensure that the member groups specified in the resource are present in the group. When destroying the resource, the resource will ensure that the member groups specified in the resource are removed.

    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.

    If true, this resource will take exclusive control of the member groups that belong to the group and will set it equal to what is specified in the resource.

    If set to false, this resource will simply ensure that the member groups specified in the resource are present in the group. When destroying the resource, the resource will ensure that the member groups specified in the resource are removed.

    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.

    If true, this resource will take exclusive control of the member groups that belong to the group and will set it equal to what is specified in the resource.

    If set to false, this resource will simply ensure that the member groups specified in the resource are present in the group. When destroying the resource, the resource will ensure that the member groups specified in the resource are removed.

    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.

    If true, this resource will take exclusive control of the member groups that belong to the group and will set it equal to what is specified in the resource.

    If set to false, this resource will simply ensure that the member groups specified in the resource are present in the group. When destroying the resource, the resource will ensure that the member groups specified in the resource are removed.

    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.

    If true, this resource will take exclusive control of the member groups that belong to the group and will set it equal to what is specified in the resource.

    If set to false, this resource will simply ensure that the member groups specified in the resource are present in the group. When destroying the resource, the resource will ensure that the member groups specified in the resource are removed.

    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.

    If true, this resource will take exclusive control of the member groups that belong to the group and will set it equal to what is specified in the resource.

    If set to false, this resource will simply ensure that the member groups specified in the resource are present in the group. When destroying the resource, the resource will ensure that the member groups specified in the resource are removed.

    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 v6.1.0 published on Thursday, Apr 4, 2024 by Pulumi