AuthBackendUser

Provides a resource to create a user in an LDAP auth backend within Vault.

Example Usage

using Pulumi;
using Vault = Pulumi.Vault;

class MyStack : Stack
{
    public MyStack()
    {
        var ldap = new Vault.Ldap.AuthBackend("ldap", new Vault.Ldap.AuthBackendArgs
        {
            Discoverdn = false,
            Groupdn = "OU=Groups,DC=example,DC=org",
            Groupfilter = "(&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}}))",
            Path = "ldap",
            Upndomain = "EXAMPLE.ORG",
            Url = "ldaps://dc-01.example.org",
            Userattr = "sAMAccountName",
            Userdn = "OU=Users,OU=Accounts,DC=example,DC=org",
        });
        var user = new Vault.Ldap.AuthBackendUser("user", new Vault.Ldap.AuthBackendUserArgs
        {
            Backend = ldap.Path,
            Policies = 
            {
                "dba",
                "sysops",
            },
            Username = "test-user",
        });
    }

}

Coming soon!

import pulumi
import pulumi_vault as vault

ldap = vault.ldap.AuthBackend("ldap",
    discoverdn=False,
    groupdn="OU=Groups,DC=example,DC=org",
    groupfilter="(&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}}))",
    path="ldap",
    upndomain="EXAMPLE.ORG",
    url="ldaps://dc-01.example.org",
    userattr="sAMAccountName",
    userdn="OU=Users,OU=Accounts,DC=example,DC=org")
user = vault.ldap.AuthBackendUser("user",
    backend=ldap.path,
    policies=[
        "dba",
        "sysops",
    ],
    username="test-user")
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";

const ldap = new vault.ldap.AuthBackend("ldap", {
    discoverdn: false,
    groupdn: "OU=Groups,DC=example,DC=org",
    groupfilter: "(&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}}))",
    path: "ldap",
    upndomain: "EXAMPLE.ORG",
    url: "ldaps://dc-01.example.org",
    userattr: "sAMAccountName",
    userdn: "OU=Users,OU=Accounts,DC=example,DC=org",
});
const user = new vault.ldap.AuthBackendUser("user", {
    backend: ldap.path,
    policies: [
        "dba",
        "sysops",
    ],
    username: "test-user",
});

Create a AuthBackendUser Resource

def AuthBackendUser(resource_name, opts=None, backend=None, groups=None, policies=None, username=None, __props__=None);
name string
The unique name of the resource.
args AuthBackendUserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AuthBackendUserArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AuthBackendUserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AuthBackendUser Resource Properties

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

Inputs

The AuthBackendUser resource accepts the following input properties:

Username string

The LDAP username

Backend string

Path to the authentication backend

Groups List<string>

Override LDAP groups which should be granted to user

Policies List<string>

Policies which should be granted to user

Username string

The LDAP username

Backend string

Path to the authentication backend

Groups []string

Override LDAP groups which should be granted to user

Policies []string

Policies which should be granted to user

username string

The LDAP username

backend string

Path to the authentication backend

groups string[]

Override LDAP groups which should be granted to user

policies string[]

Policies which should be granted to user

username str

The LDAP username

backend str

Path to the authentication backend

groups List[str]

Override LDAP groups which should be granted to user

policies List[str]

Policies which should be granted to user

Outputs

All input properties are implicitly available as output properties. Additionally, the AuthBackendUser 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing AuthBackendUser Resource

Get an existing AuthBackendUser 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?: AuthBackendUserState, opts?: CustomResourceOptions): AuthBackendUser
static get(resource_name, id, opts=None, backend=None, groups=None, policies=None, username=None, __props__=None);
func GetAuthBackendUser(ctx *Context, name string, id IDInput, state *AuthBackendUserState, opts ...ResourceOption) (*AuthBackendUser, error)
public static AuthBackendUser Get(string name, Input<string> id, AuthBackendUserState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Backend string

Path to the authentication backend

Groups List<string>

Override LDAP groups which should be granted to user

Policies List<string>

Policies which should be granted to user

Username string

The LDAP username

Backend string

Path to the authentication backend

Groups []string

Override LDAP groups which should be granted to user

Policies []string

Policies which should be granted to user

Username string

The LDAP username

backend string

Path to the authentication backend

groups string[]

Override LDAP groups which should be granted to user

policies string[]

Policies which should be granted to user

username string

The LDAP username

backend str

Path to the authentication backend

groups List[str]

Override LDAP groups which should be granted to user

policies List[str]

Policies which should be granted to user

username str

The LDAP username

Package Details

Repository
https://github.com/pulumi/pulumi-vault
License
Apache-2.0
Notes
This Pulumi package is based on the vault Terraform Provider.