1. Packages
  2. Pulumi Vault Provider
  3. API Docs
  4. identity
  5. EntityAlias
HashiCorp Vault v6.4.0 published on Wednesday, Nov 20, 2024 by Pulumi

vault.identity.EntityAlias

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.4.0 published on Wednesday, Nov 20, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const test = new vault.identity.EntityAlias("test", {
        name: "user_1",
        mountAccessor: "token_1f2bd5",
        canonicalId: "49877D63-07AD-4B85-BDA8-B61626C477E8",
    });
    
    import pulumi
    import pulumi_vault as vault
    
    test = vault.identity.EntityAlias("test",
        name="user_1",
        mount_accessor="token_1f2bd5",
        canonical_id="49877D63-07AD-4B85-BDA8-B61626C477E8")
    
    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.NewEntityAlias(ctx, "test", &identity.EntityAliasArgs{
    			Name:          pulumi.String("user_1"),
    			MountAccessor: pulumi.String("token_1f2bd5"),
    			CanonicalId:   pulumi.String("49877D63-07AD-4B85-BDA8-B61626C477E8"),
    		})
    		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.EntityAlias("test", new()
        {
            Name = "user_1",
            MountAccessor = "token_1f2bd5",
            CanonicalId = "49877D63-07AD-4B85-BDA8-B61626C477E8",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.identity.EntityAlias;
    import com.pulumi.vault.identity.EntityAliasArgs;
    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 EntityAlias("test", EntityAliasArgs.builder()
                .name("user_1")
                .mountAccessor("token_1f2bd5")
                .canonicalId("49877D63-07AD-4B85-BDA8-B61626C477E8")
                .build());
    
        }
    }
    
    resources:
      test:
        type: vault:identity:EntityAlias
        properties:
          name: user_1
          mountAccessor: token_1f2bd5
          canonicalId: 49877D63-07AD-4B85-BDA8-B61626C477E8
    

    Create EntityAlias Resource

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

    Constructor syntax

    new EntityAlias(name: string, args: EntityAliasArgs, opts?: CustomResourceOptions);
    @overload
    def EntityAlias(resource_name: str,
                    args: EntityAliasArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def EntityAlias(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    canonical_id: Optional[str] = None,
                    mount_accessor: Optional[str] = None,
                    custom_metadata: Optional[Mapping[str, str]] = None,
                    name: Optional[str] = None,
                    namespace: Optional[str] = None)
    func NewEntityAlias(ctx *Context, name string, args EntityAliasArgs, opts ...ResourceOption) (*EntityAlias, error)
    public EntityAlias(string name, EntityAliasArgs args, CustomResourceOptions? opts = null)
    public EntityAlias(String name, EntityAliasArgs args)
    public EntityAlias(String name, EntityAliasArgs args, CustomResourceOptions options)
    
    type: vault:identity:EntityAlias
    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 EntityAliasArgs
    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 EntityAliasArgs
    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 EntityAliasArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EntityAliasArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EntityAliasArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var entityAliasResource = new Vault.Identity.EntityAlias("entityAliasResource", new()
    {
        CanonicalId = "string",
        MountAccessor = "string",
        CustomMetadata = 
        {
            { "string", "string" },
        },
        Name = "string",
        Namespace = "string",
    });
    
    example, err := identity.NewEntityAlias(ctx, "entityAliasResource", &identity.EntityAliasArgs{
    	CanonicalId:   pulumi.String("string"),
    	MountAccessor: pulumi.String("string"),
    	CustomMetadata: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:      pulumi.String("string"),
    	Namespace: pulumi.String("string"),
    })
    
    var entityAliasResource = new EntityAlias("entityAliasResource", EntityAliasArgs.builder()
        .canonicalId("string")
        .mountAccessor("string")
        .customMetadata(Map.of("string", "string"))
        .name("string")
        .namespace("string")
        .build());
    
    entity_alias_resource = vault.identity.EntityAlias("entityAliasResource",
        canonical_id="string",
        mount_accessor="string",
        custom_metadata={
            "string": "string",
        },
        name="string",
        namespace="string")
    
    const entityAliasResource = new vault.identity.EntityAlias("entityAliasResource", {
        canonicalId: "string",
        mountAccessor: "string",
        customMetadata: {
            string: "string",
        },
        name: "string",
        namespace: "string",
    });
    
    type: vault:identity:EntityAlias
    properties:
        canonicalId: string
        customMetadata:
            string: string
        mountAccessor: string
        name: string
        namespace: string
    

    EntityAlias Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The EntityAlias resource accepts the following input properties:

    CanonicalId string
    Entity ID to which this alias belongs to.
    MountAccessor string
    Accessor of the mount to which the alias should belong to.
    CustomMetadata Dictionary<string, string>
    Custom metadata to be associated with this alias.
    Name string
    Name of the alias. Name should be the identifier of the client in the authentication source. For example, if the alias belongs to userpass backend, the name should be a valid username within userpass backend. If alias belongs to GitHub, it should be the GitHub username.
    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.
    CanonicalId string
    Entity ID to which this alias belongs to.
    MountAccessor string
    Accessor of the mount to which the alias should belong to.
    CustomMetadata map[string]string
    Custom metadata to be associated with this alias.
    Name string
    Name of the alias. Name should be the identifier of the client in the authentication source. For example, if the alias belongs to userpass backend, the name should be a valid username within userpass backend. If alias belongs to GitHub, it should be the GitHub username.
    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.
    canonicalId String
    Entity ID to which this alias belongs to.
    mountAccessor String
    Accessor of the mount to which the alias should belong to.
    customMetadata Map<String,String>
    Custom metadata to be associated with this alias.
    name String
    Name of the alias. Name should be the identifier of the client in the authentication source. For example, if the alias belongs to userpass backend, the name should be a valid username within userpass backend. If alias belongs to GitHub, it should be the GitHub username.
    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.
    canonicalId string
    Entity ID to which this alias belongs to.
    mountAccessor string
    Accessor of the mount to which the alias should belong to.
    customMetadata {[key: string]: string}
    Custom metadata to be associated with this alias.
    name string
    Name of the alias. Name should be the identifier of the client in the authentication source. For example, if the alias belongs to userpass backend, the name should be a valid username within userpass backend. If alias belongs to GitHub, it should be the GitHub username.
    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.
    canonical_id str
    Entity ID to which this alias belongs to.
    mount_accessor str
    Accessor of the mount to which the alias should belong to.
    custom_metadata Mapping[str, str]
    Custom metadata to be associated with this alias.
    name str
    Name of the alias. Name should be the identifier of the client in the authentication source. For example, if the alias belongs to userpass backend, the name should be a valid username within userpass backend. If alias belongs to GitHub, it should be the GitHub username.
    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.
    canonicalId String
    Entity ID to which this alias belongs to.
    mountAccessor String
    Accessor of the mount to which the alias should belong to.
    customMetadata Map<String>
    Custom metadata to be associated with this alias.
    name String
    Name of the alias. Name should be the identifier of the client in the authentication source. For example, if the alias belongs to userpass backend, the name should be a valid username within userpass backend. If alias belongs to GitHub, it should be the GitHub username.
    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 EntityAlias 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 EntityAlias Resource

    Get an existing EntityAlias 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?: EntityAliasState, opts?: CustomResourceOptions): EntityAlias
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            canonical_id: Optional[str] = None,
            custom_metadata: Optional[Mapping[str, str]] = None,
            mount_accessor: Optional[str] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None) -> EntityAlias
    func GetEntityAlias(ctx *Context, name string, id IDInput, state *EntityAliasState, opts ...ResourceOption) (*EntityAlias, error)
    public static EntityAlias Get(string name, Input<string> id, EntityAliasState? state, CustomResourceOptions? opts = null)
    public static EntityAlias get(String name, Output<String> id, EntityAliasState 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:
    CanonicalId string
    Entity ID to which this alias belongs to.
    CustomMetadata Dictionary<string, string>
    Custom metadata to be associated with this alias.
    MountAccessor string
    Accessor of the mount to which the alias should belong to.
    Name string
    Name of the alias. Name should be the identifier of the client in the authentication source. For example, if the alias belongs to userpass backend, the name should be a valid username within userpass backend. If alias belongs to GitHub, it should be the GitHub username.
    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.
    CanonicalId string
    Entity ID to which this alias belongs to.
    CustomMetadata map[string]string
    Custom metadata to be associated with this alias.
    MountAccessor string
    Accessor of the mount to which the alias should belong to.
    Name string
    Name of the alias. Name should be the identifier of the client in the authentication source. For example, if the alias belongs to userpass backend, the name should be a valid username within userpass backend. If alias belongs to GitHub, it should be the GitHub username.
    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.
    canonicalId String
    Entity ID to which this alias belongs to.
    customMetadata Map<String,String>
    Custom metadata to be associated with this alias.
    mountAccessor String
    Accessor of the mount to which the alias should belong to.
    name String
    Name of the alias. Name should be the identifier of the client in the authentication source. For example, if the alias belongs to userpass backend, the name should be a valid username within userpass backend. If alias belongs to GitHub, it should be the GitHub username.
    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.
    canonicalId string
    Entity ID to which this alias belongs to.
    customMetadata {[key: string]: string}
    Custom metadata to be associated with this alias.
    mountAccessor string
    Accessor of the mount to which the alias should belong to.
    name string
    Name of the alias. Name should be the identifier of the client in the authentication source. For example, if the alias belongs to userpass backend, the name should be a valid username within userpass backend. If alias belongs to GitHub, it should be the GitHub username.
    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.
    canonical_id str
    Entity ID to which this alias belongs to.
    custom_metadata Mapping[str, str]
    Custom metadata to be associated with this alias.
    mount_accessor str
    Accessor of the mount to which the alias should belong to.
    name str
    Name of the alias. Name should be the identifier of the client in the authentication source. For example, if the alias belongs to userpass backend, the name should be a valid username within userpass backend. If alias belongs to GitHub, it should be the GitHub username.
    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.
    canonicalId String
    Entity ID to which this alias belongs to.
    customMetadata Map<String>
    Custom metadata to be associated with this alias.
    mountAccessor String
    Accessor of the mount to which the alias should belong to.
    name String
    Name of the alias. Name should be the identifier of the client in the authentication source. For example, if the alias belongs to userpass backend, the name should be a valid username within userpass backend. If alias belongs to GitHub, it should be the GitHub username.
    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.

    Import

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

    $ pulumi import vault:identity/entityAlias:EntityAlias test "3856fb4d-3c91-dcaf-2401-68f446796bfb"
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.4.0 published on Wednesday, Nov 20, 2024 by Pulumi