1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. identity
  5. Entity
HashiCorp Vault v6.0.0 published on Monday, Mar 25, 2024 by Pulumi

vault.identity.Entity

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.0.0 published on Monday, Mar 25, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const test = new vault.identity.Entity("test", {
        metadata: {
            foo: "bar",
        },
        policies: ["test"],
    });
    
    import pulumi
    import pulumi_vault as vault
    
    test = vault.identity.Entity("test",
        metadata={
            "foo": "bar",
        },
        policies=["test"])
    
    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 {
    		_, err := identity.NewEntity(ctx, "test", &identity.EntityArgs{
    			Metadata: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    			Policies: pulumi.StringArray{
    				pulumi.String("test"),
    			},
    		})
    		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 test = new Vault.Identity.Entity("test", new()
        {
            Metadata = 
            {
                { "foo", "bar" },
            },
            Policies = new[]
            {
                "test",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.identity.Entity;
    import com.pulumi.vault.identity.EntityArgs;
    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 test = new Entity("test", EntityArgs.builder()        
                .metadata(Map.of("foo", "bar"))
                .policies("test")
                .build());
    
        }
    }
    
    resources:
      test:
        type: vault:identity:Entity
        properties:
          metadata:
            foo: bar
          policies:
            - test
    

    Create Entity Resource

    new Entity(name: string, args?: EntityArgs, opts?: CustomResourceOptions);
    @overload
    def Entity(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               disabled: Optional[bool] = None,
               external_policies: Optional[bool] = None,
               metadata: Optional[Mapping[str, str]] = None,
               name: Optional[str] = None,
               namespace: Optional[str] = None,
               policies: Optional[Sequence[str]] = None)
    @overload
    def Entity(resource_name: str,
               args: Optional[EntityArgs] = None,
               opts: Optional[ResourceOptions] = None)
    func NewEntity(ctx *Context, name string, args *EntityArgs, opts ...ResourceOption) (*Entity, error)
    public Entity(string name, EntityArgs? args = null, CustomResourceOptions? opts = null)
    public Entity(String name, EntityArgs args)
    public Entity(String name, EntityArgs args, CustomResourceOptions options)
    
    type: vault:identity:Entity
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args EntityArgs
    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 EntityArgs
    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 EntityArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EntityArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EntityArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Entity 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 Entity resource accepts the following input properties:

    Disabled bool
    True/false Is this entity currently disabled. Defaults to false
    ExternalPolicies bool
    false by default. If set to true, this resource will ignore any policies return from Vault or specified in the resource. You can use vault.identity.EntityPolicies to manage policies for this entity in a decoupled manner.
    Metadata Dictionary<string, string>
    A Map of additional metadata to associate with the user.
    Name string
    Name of the identity entity to create.
    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.
    Policies List<string>
    A list of policies to apply to the entity.
    Disabled bool
    True/false Is this entity currently disabled. Defaults to false
    ExternalPolicies bool
    false by default. If set to true, this resource will ignore any policies return from Vault or specified in the resource. You can use vault.identity.EntityPolicies to manage policies for this entity in a decoupled manner.
    Metadata map[string]string
    A Map of additional metadata to associate with the user.
    Name string
    Name of the identity entity to create.
    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.
    Policies []string
    A list of policies to apply to the entity.
    disabled Boolean
    True/false Is this entity currently disabled. Defaults to false
    externalPolicies Boolean
    false by default. If set to true, this resource will ignore any policies return from Vault or specified in the resource. You can use vault.identity.EntityPolicies to manage policies for this entity in a decoupled manner.
    metadata Map<String,String>
    A Map of additional metadata to associate with the user.
    name String
    Name of the identity entity to create.
    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.
    policies List<String>
    A list of policies to apply to the entity.
    disabled boolean
    True/false Is this entity currently disabled. Defaults to false
    externalPolicies boolean
    false by default. If set to true, this resource will ignore any policies return from Vault or specified in the resource. You can use vault.identity.EntityPolicies to manage policies for this entity in a decoupled manner.
    metadata {[key: string]: string}
    A Map of additional metadata to associate with the user.
    name string
    Name of the identity entity to create.
    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.
    policies string[]
    A list of policies to apply to the entity.
    disabled bool
    True/false Is this entity currently disabled. Defaults to false
    external_policies bool
    false by default. If set to true, this resource will ignore any policies return from Vault or specified in the resource. You can use vault.identity.EntityPolicies to manage policies for this entity in a decoupled manner.
    metadata Mapping[str, str]
    A Map of additional metadata to associate with the user.
    name str
    Name of the identity entity to create.
    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.
    policies Sequence[str]
    A list of policies to apply to the entity.
    disabled Boolean
    True/false Is this entity currently disabled. Defaults to false
    externalPolicies Boolean
    false by default. If set to true, this resource will ignore any policies return from Vault or specified in the resource. You can use vault.identity.EntityPolicies to manage policies for this entity in a decoupled manner.
    metadata Map<String>
    A Map of additional metadata to associate with the user.
    name String
    Name of the identity entity to create.
    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.
    policies List<String>
    A list of policies to apply to the entity.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Entity 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 Entity Resource

    Get an existing Entity 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?: EntityState, opts?: CustomResourceOptions): Entity
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            disabled: Optional[bool] = None,
            external_policies: Optional[bool] = None,
            metadata: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            policies: Optional[Sequence[str]] = None) -> Entity
    func GetEntity(ctx *Context, name string, id IDInput, state *EntityState, opts ...ResourceOption) (*Entity, error)
    public static Entity Get(string name, Input<string> id, EntityState? state, CustomResourceOptions? opts = null)
    public static Entity get(String name, Output<String> id, EntityState 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:
    Disabled bool
    True/false Is this entity currently disabled. Defaults to false
    ExternalPolicies bool
    false by default. If set to true, this resource will ignore any policies return from Vault or specified in the resource. You can use vault.identity.EntityPolicies to manage policies for this entity in a decoupled manner.
    Metadata Dictionary<string, string>
    A Map of additional metadata to associate with the user.
    Name string
    Name of the identity entity to create.
    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.
    Policies List<string>
    A list of policies to apply to the entity.
    Disabled bool
    True/false Is this entity currently disabled. Defaults to false
    ExternalPolicies bool
    false by default. If set to true, this resource will ignore any policies return from Vault or specified in the resource. You can use vault.identity.EntityPolicies to manage policies for this entity in a decoupled manner.
    Metadata map[string]string
    A Map of additional metadata to associate with the user.
    Name string
    Name of the identity entity to create.
    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.
    Policies []string
    A list of policies to apply to the entity.
    disabled Boolean
    True/false Is this entity currently disabled. Defaults to false
    externalPolicies Boolean
    false by default. If set to true, this resource will ignore any policies return from Vault or specified in the resource. You can use vault.identity.EntityPolicies to manage policies for this entity in a decoupled manner.
    metadata Map<String,String>
    A Map of additional metadata to associate with the user.
    name String
    Name of the identity entity to create.
    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.
    policies List<String>
    A list of policies to apply to the entity.
    disabled boolean
    True/false Is this entity currently disabled. Defaults to false
    externalPolicies boolean
    false by default. If set to true, this resource will ignore any policies return from Vault or specified in the resource. You can use vault.identity.EntityPolicies to manage policies for this entity in a decoupled manner.
    metadata {[key: string]: string}
    A Map of additional metadata to associate with the user.
    name string
    Name of the identity entity to create.
    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.
    policies string[]
    A list of policies to apply to the entity.
    disabled bool
    True/false Is this entity currently disabled. Defaults to false
    external_policies bool
    false by default. If set to true, this resource will ignore any policies return from Vault or specified in the resource. You can use vault.identity.EntityPolicies to manage policies for this entity in a decoupled manner.
    metadata Mapping[str, str]
    A Map of additional metadata to associate with the user.
    name str
    Name of the identity entity to create.
    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.
    policies Sequence[str]
    A list of policies to apply to the entity.
    disabled Boolean
    True/false Is this entity currently disabled. Defaults to false
    externalPolicies Boolean
    false by default. If set to true, this resource will ignore any policies return from Vault or specified in the resource. You can use vault.identity.EntityPolicies to manage policies for this entity in a decoupled manner.
    metadata Map<String>
    A Map of additional metadata to associate with the user.
    name String
    Name of the identity entity to create.
    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.
    policies List<String>
    A list of policies to apply to the entity.

    Import

    Identity entity can be imported using the id, e.g.

    $ pulumi import vault:identity/entity:Entity test "ae6f8ued-0f1a-9f6b-2915-1a2be20dc053"
    

    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.0.0 published on Monday, Mar 25, 2024 by Pulumi