All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.vault.identity.kotlin.GroupAliasArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.4.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.vault.identity.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.vault.identity.GroupAliasArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Creates an Identity Group Alias for Vault. The [Identity secrets engine](https://www.vaultproject.io/docs/secrets/identity/index.html) is the identity management solution for Vault.
 * Group aliases allows entity membership in external groups to be managed semi-automatically. External group serves as a mapping to a group that is outside of the identity store. External groups can have one (and only one) alias. This alias should map to a notion of group that is outside of the identity store. For example, groups in LDAP, and teams in GitHub. A username in LDAP, belonging to a group in LDAP, can get its entity ID added as a member of a group in Vault automatically during logins and token renewals. This works only if the group in Vault is an external group and has an alias that maps to the group in LDAP. If the user is removed from the group in LDAP, that change gets reflected in Vault only upon the subsequent login or renewal operation.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as vault from "@pulumi/vault";
 * const group = new vault.identity.Group("group", {
 *     name: "test",
 *     type: "external",
 *     policies: ["test"],
 * });
 * const github = new vault.AuthBackend("github", {
 *     type: "github",
 *     path: "github",
 * });
 * const group_alias = new vault.identity.GroupAlias("group-alias", {
 *     name: "Github_Team_Slug",
 *     mountAccessor: github.accessor,
 *     canonicalId: group.id,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_vault as vault
 * group = vault.identity.Group("group",
 *     name="test",
 *     type="external",
 *     policies=["test"])
 * github = vault.AuthBackend("github",
 *     type="github",
 *     path="github")
 * group_alias = vault.identity.GroupAlias("group-alias",
 *     name="Github_Team_Slug",
 *     mount_accessor=github.accessor,
 *     canonical_id=group.id)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Vault = Pulumi.Vault;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @group = new Vault.Identity.Group("group", new()
 *     {
 *         Name = "test",
 *         Type = "external",
 *         Policies = new[]
 *         {
 *             "test",
 *         },
 *     });
 *     var github = new Vault.AuthBackend("github", new()
 *     {
 *         Type = "github",
 *         Path = "github",
 *     });
 *     var group_alias = new Vault.Identity.GroupAlias("group-alias", new()
 *     {
 *         Name = "Github_Team_Slug",
 *         MountAccessor = github.Accessor,
 *         CanonicalId = @group.Id,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
 * 	"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 {
 * 		group, err := identity.NewGroup(ctx, "group", &identity.GroupArgs{
 * 			Name: pulumi.String("test"),
 * 			Type: pulumi.String("external"),
 * 			Policies: pulumi.StringArray{
 * 				pulumi.String("test"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		github, err := vault.NewAuthBackend(ctx, "github", &vault.AuthBackendArgs{
 * 			Type: pulumi.String("github"),
 * 			Path: pulumi.String("github"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = identity.NewGroupAlias(ctx, "group-alias", &identity.GroupAliasArgs{
 * 			Name:          pulumi.String("Github_Team_Slug"),
 * 			MountAccessor: github.Accessor,
 * 			CanonicalId:   group.ID(),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.vault.identity.Group;
 * import com.pulumi.vault.identity.GroupArgs;
 * import com.pulumi.vault.AuthBackend;
 * import com.pulumi.vault.AuthBackendArgs;
 * import com.pulumi.vault.identity.GroupAlias;
 * import com.pulumi.vault.identity.GroupAliasArgs;
 * 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 group = new Group("group", GroupArgs.builder()
 *             .name("test")
 *             .type("external")
 *             .policies("test")
 *             .build());
 *         var github = new AuthBackend("github", AuthBackendArgs.builder()
 *             .type("github")
 *             .path("github")
 *             .build());
 *         var group_alias = new GroupAlias("group-alias", GroupAliasArgs.builder()
 *             .name("Github_Team_Slug")
 *             .mountAccessor(github.accessor())
 *             .canonicalId(group.id())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   group:
 *     type: vault:identity:Group
 *     properties:
 *       name: test
 *       type: external
 *       policies:
 *         - test
 *   github:
 *     type: vault:AuthBackend
 *     properties:
 *       type: github
 *       path: github
 *   group-alias:
 *     type: vault:identity:GroupAlias
 *     properties:
 *       name: Github_Team_Slug
 *       mountAccessor: ${github.accessor}
 *       canonicalId: ${group.id}
 * ```
 * 
 * ## Import
 * The group alias can be imported with the group alias `id`, for example:
 * ```sh
 * $ pulumi import vault:identity/groupAlias:GroupAlias group-alias id
 * ```
 * Group aliases can also be imported using the UUID of the alias record, e.g.
 * ```sh
 * $ pulumi import vault:identity/groupAlias:GroupAlias alias_name 63104e20-88e4-11eb-8d04-cf7ac9d60157
 * ```
 * @property canonicalId ID of the group to which this is an alias.
 * @property mountAccessor Mount accessor of the authentication backend to which this alias belongs to.
 * @property name Name of the group alias to create.
 * @property namespace 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*.
 */
public data class GroupAliasArgs(
    public val canonicalId: Output? = null,
    public val mountAccessor: Output? = null,
    public val name: Output? = null,
    public val namespace: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.identity.GroupAliasArgs =
        com.pulumi.vault.identity.GroupAliasArgs.builder()
            .canonicalId(canonicalId?.applyValue({ args0 -> args0 }))
            .mountAccessor(mountAccessor?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .namespace(namespace?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [GroupAliasArgs].
 */
@PulumiTagMarker
public class GroupAliasArgsBuilder internal constructor() {
    private var canonicalId: Output? = null

    private var mountAccessor: Output? = null

    private var name: Output? = null

    private var namespace: Output? = null

    /**
     * @param value ID of the group to which this is an alias.
     */
    @JvmName("uhonenckipaevrtr")
    public suspend fun canonicalId(`value`: Output) {
        this.canonicalId = value
    }

    /**
     * @param value Mount accessor of the authentication backend to which this alias belongs to.
     */
    @JvmName("htgqrjlwlpgnbnlw")
    public suspend fun mountAccessor(`value`: Output) {
        this.mountAccessor = value
    }

    /**
     * @param value Name of the group alias to create.
     */
    @JvmName("frvsvqfkffmgvexr")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value 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*.
     */
    @JvmName("inxocdxqkcrbhndj")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value ID of the group to which this is an alias.
     */
    @JvmName("wuhhfpkhynqdujsh")
    public suspend fun canonicalId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.canonicalId = mapped
    }

    /**
     * @param value Mount accessor of the authentication backend to which this alias belongs to.
     */
    @JvmName("cfmmlrigpromstap")
    public suspend fun mountAccessor(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mountAccessor = mapped
    }

    /**
     * @param value Name of the group alias to create.
     */
    @JvmName("kqxpawxoiegmiphu")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value 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*.
     */
    @JvmName("vehyhrahxeakbkyj")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    internal fun build(): GroupAliasArgs = GroupAliasArgs(
        canonicalId = canonicalId,
        mountAccessor = mountAccessor,
        name = name,
        namespace = namespace,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy