UNPKG

@pulumi/vault

Version:

A Pulumi package for creating and managing HashiCorp Vault cloud resources.

149 lines (148 loc) 5.59 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a resource to create a user in an [LDAP auth backend within Vault](https://www.vaultproject.io/docs/auth/ldap.html). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const ldap = new vault.ldap.AuthBackend("ldap", { * path: "ldap", * url: "ldaps://dc-01.example.org", * userdn: "OU=Users,OU=Accounts,DC=example,DC=org", * userattr: "sAMAccountName", * upndomain: "EXAMPLE.ORG", * discoverdn: false, * groupdn: "OU=Groups,DC=example,DC=org", * groupfilter: "(&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}}))", * }); * const user = new vault.ldap.AuthBackendUser("user", { * username: "test-user", * policies: [ * "dba", * "sysops", * ], * backend: ldap.path, * }); * ``` * * ## Import * * LDAP authentication backend users can be imported using the `path`, e.g. * * ```sh * $ pulumi import vault:ldap/authBackendUser:AuthBackendUser foo auth/ldap/users/foo * ``` */ export declare class AuthBackendUser extends pulumi.CustomResource { /** * Get an existing AuthBackendUser resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AuthBackendUserState, opts?: pulumi.CustomResourceOptions): AuthBackendUser; /** * Returns true if the given object is an instance of AuthBackendUser. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is AuthBackendUser; /** * Path to the authentication backend * * For more details on the usage of each argument consult the [Vault LDAP API documentation](https://www.vaultproject.io/api-docs/auth/ldap). */ readonly backend: pulumi.Output<string | undefined>; /** * Override LDAP groups which should be granted to user */ readonly groups: pulumi.Output<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](https://www.terraform.io/docs/providers/vault/index.html#namespace). * *Available only for Vault Enterprise*. */ readonly namespace: pulumi.Output<string | undefined>; /** * Policies which should be granted to user */ readonly policies: pulumi.Output<string[]>; /** * The LDAP username */ readonly username: pulumi.Output<string>; /** * Create a AuthBackendUser resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: AuthBackendUserArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AuthBackendUser resources. */ export interface AuthBackendUserState { /** * Path to the authentication backend * * For more details on the usage of each argument consult the [Vault LDAP API documentation](https://www.vaultproject.io/api-docs/auth/ldap). */ backend?: pulumi.Input<string>; /** * Override LDAP groups which should be granted to user */ groups?: pulumi.Input<pulumi.Input<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](https://www.terraform.io/docs/providers/vault/index.html#namespace). * *Available only for Vault Enterprise*. */ namespace?: pulumi.Input<string>; /** * Policies which should be granted to user */ policies?: pulumi.Input<pulumi.Input<string>[]>; /** * The LDAP username */ username?: pulumi.Input<string>; } /** * The set of arguments for constructing a AuthBackendUser resource. */ export interface AuthBackendUserArgs { /** * Path to the authentication backend * * For more details on the usage of each argument consult the [Vault LDAP API documentation](https://www.vaultproject.io/api-docs/auth/ldap). */ backend?: pulumi.Input<string>; /** * Override LDAP groups which should be granted to user */ groups?: pulumi.Input<pulumi.Input<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](https://www.terraform.io/docs/providers/vault/index.html#namespace). * *Available only for Vault Enterprise*. */ namespace?: pulumi.Input<string>; /** * Policies which should be granted to user */ policies?: pulumi.Input<pulumi.Input<string>[]>; /** * The LDAP username */ username: pulumi.Input<string>; }