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

com.pulumi.vault.ssh.kotlin.SecretBackendCaArgs.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.ssh.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.ssh.SecretBackendCaArgs.builder
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Provides a resource to manage CA information in an SSH secret backend
 * [SSH secret backend within Vault](https://www.vaultproject.io/docs/secrets/ssh/index.html).
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as vault from "@pulumi/vault";
 * const example = new vault.Mount("example", {type: "ssh"});
 * const foo = new vault.ssh.SecretBackendCa("foo", {backend: example.path});
 * ```
 * ```python
 * import pulumi
 * import pulumi_vault as vault
 * example = vault.Mount("example", type="ssh")
 * foo = vault.ssh.SecretBackendCa("foo", backend=example.path)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Vault = Pulumi.Vault;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Vault.Mount("example", new()
 *     {
 *         Type = "ssh",
 *     });
 *     var foo = new Vault.Ssh.SecretBackendCa("foo", new()
 *     {
 *         Backend = example.Path,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/ssh"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := vault.NewMount(ctx, "example", &vault.MountArgs{
 * 			Type: pulumi.String("ssh"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = ssh.NewSecretBackendCa(ctx, "foo", &ssh.SecretBackendCaArgs{
 * 			Backend: example.Path,
 * 		})
 * 		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.Mount;
 * import com.pulumi.vault.MountArgs;
 * import com.pulumi.vault.ssh.SecretBackendCa;
 * import com.pulumi.vault.ssh.SecretBackendCaArgs;
 * 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 Mount("example", MountArgs.builder()
 *             .type("ssh")
 *             .build());
 *         var foo = new SecretBackendCa("foo", SecretBackendCaArgs.builder()
 *             .backend(example.path())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: vault:Mount
 *     properties:
 *       type: ssh
 *   foo:
 *     type: vault:ssh:SecretBackendCa
 *     properties:
 *       backend: ${example.path}
 * ```
 * 
 * ## Import
 * SSH secret backend CAs can be imported using the `path`, e.g.
 * ```sh
 * $ pulumi import vault:ssh/secretBackendCa:SecretBackendCa foo ssh
 * ```
 * @property backend The path where the SSH secret backend is mounted. Defaults to 'ssh'
 * @property generateSigningKey Whether Vault should generate the signing key pair internally. Defaults to true
 * @property keyBits Specifies the desired key bits for the generated SSH CA key when `generate_signing_key` is set to `true`.
 * @property keyType Specifies the desired key type for the generated SSH CA key when `generate_signing_key` is set to `true`.
 * @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*.
 * @property privateKey Private key part the SSH CA key pair; required if generate_signing_key is false.
 * @property publicKey The public key part the SSH CA key pair; required if generate_signing_key is false.
 */
public data class SecretBackendCaArgs(
    public val backend: Output? = null,
    public val generateSigningKey: Output? = null,
    public val keyBits: Output? = null,
    public val keyType: Output? = null,
    public val namespace: Output? = null,
    public val privateKey: Output? = null,
    public val publicKey: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.ssh.SecretBackendCaArgs =
        com.pulumi.vault.ssh.SecretBackendCaArgs.builder()
            .backend(backend?.applyValue({ args0 -> args0 }))
            .generateSigningKey(generateSigningKey?.applyValue({ args0 -> args0 }))
            .keyBits(keyBits?.applyValue({ args0 -> args0 }))
            .keyType(keyType?.applyValue({ args0 -> args0 }))
            .namespace(namespace?.applyValue({ args0 -> args0 }))
            .privateKey(privateKey?.applyValue({ args0 -> args0 }))
            .publicKey(publicKey?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SecretBackendCaArgs].
 */
@PulumiTagMarker
public class SecretBackendCaArgsBuilder internal constructor() {
    private var backend: Output? = null

    private var generateSigningKey: Output? = null

    private var keyBits: Output? = null

    private var keyType: Output? = null

    private var namespace: Output? = null

    private var privateKey: Output? = null

    private var publicKey: Output? = null

    /**
     * @param value The path where the SSH secret backend is mounted. Defaults to 'ssh'
     */
    @JvmName("eiefkxqpodfqioju")
    public suspend fun backend(`value`: Output) {
        this.backend = value
    }

    /**
     * @param value Whether Vault should generate the signing key pair internally. Defaults to true
     */
    @JvmName("gmstdunppeaepbbc")
    public suspend fun generateSigningKey(`value`: Output) {
        this.generateSigningKey = value
    }

    /**
     * @param value Specifies the desired key bits for the generated SSH CA key when `generate_signing_key` is set to `true`.
     */
    @JvmName("wlywnkdmqioarkjb")
    public suspend fun keyBits(`value`: Output) {
        this.keyBits = value
    }

    /**
     * @param value Specifies the desired key type for the generated SSH CA key when `generate_signing_key` is set to `true`.
     */
    @JvmName("vjiglyptylxfogrb")
    public suspend fun keyType(`value`: Output) {
        this.keyType = 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("jnjsxaqwmfdrxmcx")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value Private key part the SSH CA key pair; required if generate_signing_key is false.
     */
    @JvmName("iwxpewgnfqlakmth")
    public suspend fun privateKey(`value`: Output) {
        this.privateKey = value
    }

    /**
     * @param value The public key part the SSH CA key pair; required if generate_signing_key is false.
     */
    @JvmName("ctwxnqlfyqsmlaig")
    public suspend fun publicKey(`value`: Output) {
        this.publicKey = value
    }

    /**
     * @param value The path where the SSH secret backend is mounted. Defaults to 'ssh'
     */
    @JvmName("ltbammtnnnnynghl")
    public suspend fun backend(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backend = mapped
    }

    /**
     * @param value Whether Vault should generate the signing key pair internally. Defaults to true
     */
    @JvmName("pywnffsnfypqbtsf")
    public suspend fun generateSigningKey(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.generateSigningKey = mapped
    }

    /**
     * @param value Specifies the desired key bits for the generated SSH CA key when `generate_signing_key` is set to `true`.
     */
    @JvmName("jbhxmjnvowsvvgdc")
    public suspend fun keyBits(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyBits = mapped
    }

    /**
     * @param value Specifies the desired key type for the generated SSH CA key when `generate_signing_key` is set to `true`.
     */
    @JvmName("ctfclkgthcbhhvyh")
    public suspend fun keyType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyType = 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("npjuvuheetflsfop")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    /**
     * @param value Private key part the SSH CA key pair; required if generate_signing_key is false.
     */
    @JvmName("mewodoylriyegpfi")
    public suspend fun privateKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateKey = mapped
    }

    /**
     * @param value The public key part the SSH CA key pair; required if generate_signing_key is false.
     */
    @JvmName("mjfnrqoehjofhfea")
    public suspend fun publicKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicKey = mapped
    }

    internal fun build(): SecretBackendCaArgs = SecretBackendCaArgs(
        backend = backend,
        generateSigningKey = generateSigningKey,
        keyBits = keyBits,
        keyType = keyType,
        namespace = namespace,
        privateKey = privateKey,
        publicKey = publicKey,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy