User

class User : KotlinCustomResource

Manages policy mappings for Github Users authenticated via Github. See the [Vault

  • documentation](https://www.vaultproject.io/docs/auth/github/) for more information.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const example = new vault.github.AuthBackend("example", {organization: "myorg"});
const tfUser = new vault.github.User("tf_user", {
backend: example.id,
user: "john.doe",
policies: [
"developer",
"read-only",
],
});
import pulumi
import pulumi_vault as vault
example = vault.github.AuthBackend("example", organization="myorg")
tf_user = vault.github.User("tf_user",
backend=example.id,
user="john.doe",
policies=[
"developer",
"read-only",
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var example = new Vault.GitHub.AuthBackend("example", new()
{
Organization = "myorg",
});
var tfUser = new Vault.GitHub.User("tf_user", new()
{
Backend = example.Id,
UserName = "john.doe",
Policies = new[]
{
"developer",
"read-only",
},
});
});
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := github.NewAuthBackend(ctx, "example", &github.AuthBackendArgs{
Organization: pulumi.String("myorg"),
})
if err != nil {
return err
}
_, err = github.NewUser(ctx, "tf_user", &github.UserArgs{
Backend: example.ID(),
User: pulumi.String("john.doe"),
Policies: pulumi.StringArray{
pulumi.String("developer"),
pulumi.String("read-only"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.github.AuthBackend;
import com.pulumi.vault.github.AuthBackendArgs;
import com.pulumi.vault.github.User;
import com.pulumi.vault.github.UserArgs;
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 example = new AuthBackend("example", AuthBackendArgs.builder()
.organization("myorg")
.build());
var tfUser = new User("tfUser", UserArgs.builder()
.backend(example.id())
.user("john.doe")
.policies(
"developer",
"read-only")
.build());
}
}
resources:
example:
type: vault:github:AuthBackend
properties:
organization: myorg
tfUser:
type: vault:github:User
name: tf_user
properties:
backend: ${example.id}
user: john.doe
policies:
- developer
- read-only

Import

Github user mappings can be imported using the path, e.g.

$ pulumi import vault:github/user:User tf_user auth/github/map/users/john.doe

Properties

Link copied to clipboard
val backend: Output<String>?

Path where the github auth backend is mounted. Defaults to github if not specified.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val namespace: 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. Available only for Vault Enterprise.

Link copied to clipboard
val policies: Output<List<String>>?

An array of strings specifying the policies to be set on tokens issued using this role.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val user: Output<String>

GitHub user name.