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

com.pulumi.vault.kotlin.PluginArgs.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.6.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.vault.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.PluginArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as vault from "@pulumi/vault";
 * const jwt = new vault.Plugin("jwt", {
 *     type: "auth",
 *     name: "jwt",
 *     command: "vault-plugin-auth-jwt",
 *     version: "v0.17.0",
 *     sha256: "6bd0a803ed742aa3ce35e4fa23d2c8d550e6c1567bf63410cec489c28b68b0fc",
 *     envs: ["HTTP_PROXY=http://proxy.example.com:8080"],
 * });
 * const jwtAuth = new vault.AuthBackend("jwt_auth", {type: jwt.name});
 * ```
 * ```python
 * import pulumi
 * import pulumi_vault as vault
 * jwt = vault.Plugin("jwt",
 *     type="auth",
 *     name="jwt",
 *     command="vault-plugin-auth-jwt",
 *     version="v0.17.0",
 *     sha256="6bd0a803ed742aa3ce35e4fa23d2c8d550e6c1567bf63410cec489c28b68b0fc",
 *     envs=["HTTP_PROXY=http://proxy.example.com:8080"])
 * jwt_auth = vault.AuthBackend("jwt_auth", type=jwt.name)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Vault = Pulumi.Vault;
 * return await Deployment.RunAsync(() =>
 * {
 *     var jwt = new Vault.Plugin("jwt", new()
 *     {
 *         Type = "auth",
 *         Name = "jwt",
 *         Command = "vault-plugin-auth-jwt",
 *         Version = "v0.17.0",
 *         Sha256 = "6bd0a803ed742aa3ce35e4fa23d2c8d550e6c1567bf63410cec489c28b68b0fc",
 *         Envs = new[]
 *         {
 *             "HTTP_PROXY=http://proxy.example.com:8080",
 *         },
 *     });
 *     var jwtAuth = new Vault.AuthBackend("jwt_auth", new()
 *     {
 *         Type = jwt.Name,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		jwt, err := vault.NewPlugin(ctx, "jwt", &vault.PluginArgs{
 * 			Type:    pulumi.String("auth"),
 * 			Name:    pulumi.String("jwt"),
 * 			Command: pulumi.String("vault-plugin-auth-jwt"),
 * 			Version: pulumi.String("v0.17.0"),
 * 			Sha256:  pulumi.String("6bd0a803ed742aa3ce35e4fa23d2c8d550e6c1567bf63410cec489c28b68b0fc"),
 * 			Envs: pulumi.StringArray{
 * 				pulumi.String("HTTP_PROXY=http://proxy.example.com:8080"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = vault.NewAuthBackend(ctx, "jwt_auth", &vault.AuthBackendArgs{
 * 			Type: jwt.Name,
 * 		})
 * 		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.Plugin;
 * import com.pulumi.vault.PluginArgs;
 * import com.pulumi.vault.AuthBackend;
 * import com.pulumi.vault.AuthBackendArgs;
 * 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 jwt = new Plugin("jwt", PluginArgs.builder()
 *             .type("auth")
 *             .name("jwt")
 *             .command("vault-plugin-auth-jwt")
 *             .version("v0.17.0")
 *             .sha256("6bd0a803ed742aa3ce35e4fa23d2c8d550e6c1567bf63410cec489c28b68b0fc")
 *             .envs("HTTP_PROXY=http://proxy.example.com:8080")
 *             .build());
 *         var jwtAuth = new AuthBackend("jwtAuth", AuthBackendArgs.builder()
 *             .type(jwt.name())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   jwt:
 *     type: vault:Plugin
 *     properties:
 *       type: auth
 *       name: jwt
 *       command: vault-plugin-auth-jwt
 *       version: v0.17.0
 *       sha256: 6bd0a803ed742aa3ce35e4fa23d2c8d550e6c1567bf63410cec489c28b68b0fc
 *       envs:
 *         - HTTP_PROXY=http://proxy.example.com:8080
 *   jwtAuth:
 *     type: vault:AuthBackend
 *     name: jwt_auth
 *     properties:
 *       type: ${jwt.name}
 * ```
 * 
 * ## Import
 * Plugins can be imported using `:type/name/:name` or `:type/version/:version/name/:name` as the ID if the version is non-empty, e.g.
 * ```sh
 * $ pulumi import vault:index/plugin:Plugin jwt auth/name/jwt
 * ```
 * ```sh
 * $ pulumi import vault:index/plugin:Plugin jwt auth/version/v0.17.0/name/jwt
 * ```
 * @property args List of additional args to pass to the plugin.
 * @property command Command to execute the plugin, relative to the server's configured `plugin_directory`.
 * @property envs List of additional environment variables to run the plugin with in KEY=VALUE form.
 * @property name Name of the plugin.
 * @property ociImage Specifies OCI image to run. If specified, setting
 * `command`, `args`, and `env` will update the container's entrypoint, args, and
 * environment variables (append-only) respectively.
 * @property runtime Vault plugin runtime to use if `oci_image` is specified.
 * @property sha256 SHA256 sum of the plugin binary.
 * @property type Type of plugin; one of "auth", "secret", or "database".
 * @property version Semantic version of the plugin.
 */
public data class PluginArgs(
    public val args: Output>? = null,
    public val command: Output? = null,
    public val envs: Output>? = null,
    public val name: Output? = null,
    public val ociImage: Output? = null,
    public val runtime: Output? = null,
    public val sha256: Output? = null,
    public val type: Output? = null,
    public val version: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.PluginArgs = com.pulumi.vault.PluginArgs.builder()
        .args(args?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
        .command(command?.applyValue({ args0 -> args0 }))
        .envs(envs?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
        .name(name?.applyValue({ args0 -> args0 }))
        .ociImage(ociImage?.applyValue({ args0 -> args0 }))
        .runtime(runtime?.applyValue({ args0 -> args0 }))
        .sha256(sha256?.applyValue({ args0 -> args0 }))
        .type(type?.applyValue({ args0 -> args0 }))
        .version(version?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [PluginArgs].
 */
@PulumiTagMarker
public class PluginArgsBuilder internal constructor() {
    private var args: Output>? = null

    private var command: Output? = null

    private var envs: Output>? = null

    private var name: Output? = null

    private var ociImage: Output? = null

    private var runtime: Output? = null

    private var sha256: Output? = null

    private var type: Output? = null

    private var version: Output? = null

    /**
     * @param value List of additional args to pass to the plugin.
     */
    @JvmName("mflwmjhtesvvjxkh")
    public suspend fun args(`value`: Output>) {
        this.args = value
    }

    @JvmName("onamwgblsovoqxrk")
    public suspend fun args(vararg values: Output) {
        this.args = Output.all(values.asList())
    }

    /**
     * @param values List of additional args to pass to the plugin.
     */
    @JvmName("uyrllftitprxrcbx")
    public suspend fun args(values: List>) {
        this.args = Output.all(values)
    }

    /**
     * @param value Command to execute the plugin, relative to the server's configured `plugin_directory`.
     */
    @JvmName("lucbwlolhlxiyuow")
    public suspend fun command(`value`: Output) {
        this.command = value
    }

    /**
     * @param value List of additional environment variables to run the plugin with in KEY=VALUE form.
     */
    @JvmName("mlfbqfoshasyvghl")
    public suspend fun envs(`value`: Output>) {
        this.envs = value
    }

    @JvmName("rpkteeeuipxbcwmg")
    public suspend fun envs(vararg values: Output) {
        this.envs = Output.all(values.asList())
    }

    /**
     * @param values List of additional environment variables to run the plugin with in KEY=VALUE form.
     */
    @JvmName("rymdmkxmxhpivfos")
    public suspend fun envs(values: List>) {
        this.envs = Output.all(values)
    }

    /**
     * @param value Name of the plugin.
     */
    @JvmName("ugnglhljjmwyyixd")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies OCI image to run. If specified, setting
     * `command`, `args`, and `env` will update the container's entrypoint, args, and
     * environment variables (append-only) respectively.
     */
    @JvmName("vkqtastakxvuogsj")
    public suspend fun ociImage(`value`: Output) {
        this.ociImage = value
    }

    /**
     * @param value Vault plugin runtime to use if `oci_image` is specified.
     */
    @JvmName("kwpkmlakomhdnwbs")
    public suspend fun runtime(`value`: Output) {
        this.runtime = value
    }

    /**
     * @param value SHA256 sum of the plugin binary.
     */
    @JvmName("owqjvvrpgvlqvblm")
    public suspend fun sha256(`value`: Output) {
        this.sha256 = value
    }

    /**
     * @param value Type of plugin; one of "auth", "secret", or "database".
     */
    @JvmName("ojxksnwlhqolgdob")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value Semantic version of the plugin.
     */
    @JvmName("helqjpfgtqeodwtn")
    public suspend fun version(`value`: Output) {
        this.version = value
    }

    /**
     * @param value List of additional args to pass to the plugin.
     */
    @JvmName("teqvvhqltojsokam")
    public suspend fun args(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.args = mapped
    }

    /**
     * @param values List of additional args to pass to the plugin.
     */
    @JvmName("yevsifietdrmqefp")
    public suspend fun args(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.args = mapped
    }

    /**
     * @param value Command to execute the plugin, relative to the server's configured `plugin_directory`.
     */
    @JvmName("vunhpywttsixdulo")
    public suspend fun command(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.command = mapped
    }

    /**
     * @param value List of additional environment variables to run the plugin with in KEY=VALUE form.
     */
    @JvmName("iugyjxkthgnkyint")
    public suspend fun envs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.envs = mapped
    }

    /**
     * @param values List of additional environment variables to run the plugin with in KEY=VALUE form.
     */
    @JvmName("hnhybhdssssbohfc")
    public suspend fun envs(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.envs = mapped
    }

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

    /**
     * @param value Specifies OCI image to run. If specified, setting
     * `command`, `args`, and `env` will update the container's entrypoint, args, and
     * environment variables (append-only) respectively.
     */
    @JvmName("djlsdqwubpfhctef")
    public suspend fun ociImage(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ociImage = mapped
    }

    /**
     * @param value Vault plugin runtime to use if `oci_image` is specified.
     */
    @JvmName("lyvvagkuaarohfia")
    public suspend fun runtime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.runtime = mapped
    }

    /**
     * @param value SHA256 sum of the plugin binary.
     */
    @JvmName("odbkrcotjmgfhirt")
    public suspend fun sha256(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sha256 = mapped
    }

    /**
     * @param value Type of plugin; one of "auth", "secret", or "database".
     */
    @JvmName("hpetnefbuhotytcl")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value Semantic version of the plugin.
     */
    @JvmName("wbtgulywxsugdwru")
    public suspend fun version(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.version = mapped
    }

    internal fun build(): PluginArgs = PluginArgs(
        args = args,
        command = command,
        envs = envs,
        name = name,
        ociImage = ociImage,
        runtime = runtime,
        sha256 = sha256,
        type = type,
        version = version,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy