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

vault.aws.AuthBackendConfigIdentity

Explore with Pulumi AI

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

    Manages an AWS auth backend identity configuration in a Vault server. This configuration defines how Vault interacts with the identity store. See the Vault documentation for more information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const aws = new vault.AuthBackend("aws", {type: "aws"});
    const example = new vault.aws.AuthBackendConfigIdentity("example", {
        backend: aws.path,
        iamAlias: "full_arn",
        iamMetadatas: [
            "canonical_arn",
            "account_id",
        ],
    });
    
    import pulumi
    import pulumi_vault as vault
    
    aws = vault.AuthBackend("aws", type="aws")
    example = vault.aws.AuthBackendConfigIdentity("example",
        backend=aws.path,
        iam_alias="full_arn",
        iam_metadatas=[
            "canonical_arn",
            "account_id",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
    	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/aws"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		aws, err := vault.NewAuthBackend(ctx, "aws", &vault.AuthBackendArgs{
    			Type: pulumi.String("aws"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = aws.NewAuthBackendConfigIdentity(ctx, "example", &aws.AuthBackendConfigIdentityArgs{
    			Backend:  aws.Path,
    			IamAlias: pulumi.String("full_arn"),
    			IamMetadatas: pulumi.StringArray{
    				pulumi.String("canonical_arn"),
    				pulumi.String("account_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 aws = new Vault.AuthBackend("aws", new()
        {
            Type = "aws",
        });
    
        var example = new Vault.Aws.AuthBackendConfigIdentity("example", new()
        {
            Backend = aws.Path,
            IamAlias = "full_arn",
            IamMetadatas = new[]
            {
                "canonical_arn",
                "account_id",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.AuthBackend;
    import com.pulumi.vault.AuthBackendArgs;
    import com.pulumi.vault.aws.AuthBackendConfigIdentity;
    import com.pulumi.vault.aws.AuthBackendConfigIdentityArgs;
    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 aws = new AuthBackend("aws", AuthBackendArgs.builder()
                .type("aws")
                .build());
    
            var example = new AuthBackendConfigIdentity("example", AuthBackendConfigIdentityArgs.builder()
                .backend(aws.path())
                .iamAlias("full_arn")
                .iamMetadatas(            
                    "canonical_arn",
                    "account_id")
                .build());
    
        }
    }
    
    resources:
      aws:
        type: vault:AuthBackend
        properties:
          type: aws
      example:
        type: vault:aws:AuthBackendConfigIdentity
        properties:
          backend: ${aws.path}
          iamAlias: full_arn
          iamMetadatas:
            - canonical_arn
            - account_id
    

    Create AuthBackendConfigIdentity Resource

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

    Constructor syntax

    new AuthBackendConfigIdentity(name: string, args?: AuthBackendConfigIdentityArgs, opts?: CustomResourceOptions);
    @overload
    def AuthBackendConfigIdentity(resource_name: str,
                                  args: Optional[AuthBackendConfigIdentityArgs] = None,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def AuthBackendConfigIdentity(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  backend: Optional[str] = None,
                                  ec2_alias: Optional[str] = None,
                                  ec2_metadatas: Optional[Sequence[str]] = None,
                                  iam_alias: Optional[str] = None,
                                  iam_metadatas: Optional[Sequence[str]] = None,
                                  namespace: Optional[str] = None)
    func NewAuthBackendConfigIdentity(ctx *Context, name string, args *AuthBackendConfigIdentityArgs, opts ...ResourceOption) (*AuthBackendConfigIdentity, error)
    public AuthBackendConfigIdentity(string name, AuthBackendConfigIdentityArgs? args = null, CustomResourceOptions? opts = null)
    public AuthBackendConfigIdentity(String name, AuthBackendConfigIdentityArgs args)
    public AuthBackendConfigIdentity(String name, AuthBackendConfigIdentityArgs args, CustomResourceOptions options)
    
    type: vault:aws:AuthBackendConfigIdentity
    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 AuthBackendConfigIdentityArgs
    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 AuthBackendConfigIdentityArgs
    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 AuthBackendConfigIdentityArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AuthBackendConfigIdentityArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AuthBackendConfigIdentityArgs
    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 authBackendConfigIdentityResource = new Vault.Aws.AuthBackendConfigIdentity("authBackendConfigIdentityResource", new()
    {
        Backend = "string",
        Ec2Alias = "string",
        Ec2Metadatas = new[]
        {
            "string",
        },
        IamAlias = "string",
        IamMetadatas = new[]
        {
            "string",
        },
        Namespace = "string",
    });
    
    example, err := aws.NewAuthBackendConfigIdentity(ctx, "authBackendConfigIdentityResource", &aws.AuthBackendConfigIdentityArgs{
    	Backend:  pulumi.String("string"),
    	Ec2Alias: pulumi.String("string"),
    	Ec2Metadatas: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	IamAlias: pulumi.String("string"),
    	IamMetadatas: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Namespace: pulumi.String("string"),
    })
    
    var authBackendConfigIdentityResource = new AuthBackendConfigIdentity("authBackendConfigIdentityResource", AuthBackendConfigIdentityArgs.builder()
        .backend("string")
        .ec2Alias("string")
        .ec2Metadatas("string")
        .iamAlias("string")
        .iamMetadatas("string")
        .namespace("string")
        .build());
    
    auth_backend_config_identity_resource = vault.aws.AuthBackendConfigIdentity("authBackendConfigIdentityResource",
        backend="string",
        ec2_alias="string",
        ec2_metadatas=["string"],
        iam_alias="string",
        iam_metadatas=["string"],
        namespace="string")
    
    const authBackendConfigIdentityResource = new vault.aws.AuthBackendConfigIdentity("authBackendConfigIdentityResource", {
        backend: "string",
        ec2Alias: "string",
        ec2Metadatas: ["string"],
        iamAlias: "string",
        iamMetadatas: ["string"],
        namespace: "string",
    });
    
    type: vault:aws:AuthBackendConfigIdentity
    properties:
        backend: string
        ec2Alias: string
        ec2Metadatas:
            - string
        iamAlias: string
        iamMetadatas:
            - string
        namespace: string
    

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

    Backend string
    Unique name of the auth backend to configure.
    Ec2Alias string
    How to generate the identity alias when using the ec2 auth method. Valid choices are role_id, instance_id, and image_id. Defaults to role_id
    Ec2Metadatas List<string>
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the ec2_alias
    IamAlias string
    How to generate the identity alias when using the iam auth method. Valid choices are role_id, unique_id, and full_arn. Defaults to role_id
    IamMetadatas List<string>
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the iam_alias
    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.
    Backend string
    Unique name of the auth backend to configure.
    Ec2Alias string
    How to generate the identity alias when using the ec2 auth method. Valid choices are role_id, instance_id, and image_id. Defaults to role_id
    Ec2Metadatas []string
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the ec2_alias
    IamAlias string
    How to generate the identity alias when using the iam auth method. Valid choices are role_id, unique_id, and full_arn. Defaults to role_id
    IamMetadatas []string
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the iam_alias
    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.
    backend String
    Unique name of the auth backend to configure.
    ec2Alias String
    How to generate the identity alias when using the ec2 auth method. Valid choices are role_id, instance_id, and image_id. Defaults to role_id
    ec2Metadatas List<String>
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the ec2_alias
    iamAlias String
    How to generate the identity alias when using the iam auth method. Valid choices are role_id, unique_id, and full_arn. Defaults to role_id
    iamMetadatas List<String>
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the iam_alias
    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.
    backend string
    Unique name of the auth backend to configure.
    ec2Alias string
    How to generate the identity alias when using the ec2 auth method. Valid choices are role_id, instance_id, and image_id. Defaults to role_id
    ec2Metadatas string[]
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the ec2_alias
    iamAlias string
    How to generate the identity alias when using the iam auth method. Valid choices are role_id, unique_id, and full_arn. Defaults to role_id
    iamMetadatas string[]
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the iam_alias
    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.
    backend str
    Unique name of the auth backend to configure.
    ec2_alias str
    How to generate the identity alias when using the ec2 auth method. Valid choices are role_id, instance_id, and image_id. Defaults to role_id
    ec2_metadatas Sequence[str]
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the ec2_alias
    iam_alias str
    How to generate the identity alias when using the iam auth method. Valid choices are role_id, unique_id, and full_arn. Defaults to role_id
    iam_metadatas Sequence[str]
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the iam_alias
    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.
    backend String
    Unique name of the auth backend to configure.
    ec2Alias String
    How to generate the identity alias when using the ec2 auth method. Valid choices are role_id, instance_id, and image_id. Defaults to role_id
    ec2Metadatas List<String>
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the ec2_alias
    iamAlias String
    How to generate the identity alias when using the iam auth method. Valid choices are role_id, unique_id, and full_arn. Defaults to role_id
    iamMetadatas List<String>
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the iam_alias
    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 AuthBackendConfigIdentity 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 AuthBackendConfigIdentity Resource

    Get an existing AuthBackendConfigIdentity 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?: AuthBackendConfigIdentityState, opts?: CustomResourceOptions): AuthBackendConfigIdentity
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backend: Optional[str] = None,
            ec2_alias: Optional[str] = None,
            ec2_metadatas: Optional[Sequence[str]] = None,
            iam_alias: Optional[str] = None,
            iam_metadatas: Optional[Sequence[str]] = None,
            namespace: Optional[str] = None) -> AuthBackendConfigIdentity
    func GetAuthBackendConfigIdentity(ctx *Context, name string, id IDInput, state *AuthBackendConfigIdentityState, opts ...ResourceOption) (*AuthBackendConfigIdentity, error)
    public static AuthBackendConfigIdentity Get(string name, Input<string> id, AuthBackendConfigIdentityState? state, CustomResourceOptions? opts = null)
    public static AuthBackendConfigIdentity get(String name, Output<String> id, AuthBackendConfigIdentityState 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:
    Backend string
    Unique name of the auth backend to configure.
    Ec2Alias string
    How to generate the identity alias when using the ec2 auth method. Valid choices are role_id, instance_id, and image_id. Defaults to role_id
    Ec2Metadatas List<string>
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the ec2_alias
    IamAlias string
    How to generate the identity alias when using the iam auth method. Valid choices are role_id, unique_id, and full_arn. Defaults to role_id
    IamMetadatas List<string>
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the iam_alias
    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.
    Backend string
    Unique name of the auth backend to configure.
    Ec2Alias string
    How to generate the identity alias when using the ec2 auth method. Valid choices are role_id, instance_id, and image_id. Defaults to role_id
    Ec2Metadatas []string
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the ec2_alias
    IamAlias string
    How to generate the identity alias when using the iam auth method. Valid choices are role_id, unique_id, and full_arn. Defaults to role_id
    IamMetadatas []string
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the iam_alias
    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.
    backend String
    Unique name of the auth backend to configure.
    ec2Alias String
    How to generate the identity alias when using the ec2 auth method. Valid choices are role_id, instance_id, and image_id. Defaults to role_id
    ec2Metadatas List<String>
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the ec2_alias
    iamAlias String
    How to generate the identity alias when using the iam auth method. Valid choices are role_id, unique_id, and full_arn. Defaults to role_id
    iamMetadatas List<String>
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the iam_alias
    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.
    backend string
    Unique name of the auth backend to configure.
    ec2Alias string
    How to generate the identity alias when using the ec2 auth method. Valid choices are role_id, instance_id, and image_id. Defaults to role_id
    ec2Metadatas string[]
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the ec2_alias
    iamAlias string
    How to generate the identity alias when using the iam auth method. Valid choices are role_id, unique_id, and full_arn. Defaults to role_id
    iamMetadatas string[]
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the iam_alias
    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.
    backend str
    Unique name of the auth backend to configure.
    ec2_alias str
    How to generate the identity alias when using the ec2 auth method. Valid choices are role_id, instance_id, and image_id. Defaults to role_id
    ec2_metadatas Sequence[str]
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the ec2_alias
    iam_alias str
    How to generate the identity alias when using the iam auth method. Valid choices are role_id, unique_id, and full_arn. Defaults to role_id
    iam_metadatas Sequence[str]
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the iam_alias
    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.
    backend String
    Unique name of the auth backend to configure.
    ec2Alias String
    How to generate the identity alias when using the ec2 auth method. Valid choices are role_id, instance_id, and image_id. Defaults to role_id
    ec2Metadatas List<String>
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the ec2_alias
    iamAlias String
    How to generate the identity alias when using the iam auth method. Valid choices are role_id, unique_id, and full_arn. Defaults to role_id
    iamMetadatas List<String>
    The metadata to include on the token returned by the login endpoint. This metadata will be added to both audit logs, and on the iam_alias
    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

    AWS auth backend identity config can be imported using auth/, the backend path, and /config/identity e.g.

    $ pulumi import vault:aws/authBackendConfigIdentity:AuthBackendConfigIdentity example auth/aws/config/identity
    

    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