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

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

/**
 * Manages KMIP Secret Scopes in a Vault server. This feature requires
 * Vault Enterprise. See the [Vault documentation](https://www.vaultproject.io/docs/secrets/kmip)
 * for more information.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as vault from "@pulumi/vault";
 * const _default = new vault.kmip.SecretBackend("default", {
 *     path: "kmip",
 *     description: "Vault KMIP backend",
 * });
 * const dev = new vault.kmip.SecretScope("dev", {
 *     path: _default.path,
 *     scope: "dev",
 *     force: true,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_vault as vault
 * default = vault.kmip.SecretBackend("default",
 *     path="kmip",
 *     description="Vault KMIP backend")
 * dev = vault.kmip.SecretScope("dev",
 *     path=default.path,
 *     scope="dev",
 *     force=True)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Vault = Pulumi.Vault;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Vault.Kmip.SecretBackend("default", new()
 *     {
 *         Path = "kmip",
 *         Description = "Vault KMIP backend",
 *     });
 *     var dev = new Vault.Kmip.SecretScope("dev", new()
 *     {
 *         Path = @default.Path,
 *         Scope = "dev",
 *         Force = true,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/kmip"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := kmip.NewSecretBackend(ctx, "default", &kmip.SecretBackendArgs{
 * 			Path:        pulumi.String("kmip"),
 * 			Description: pulumi.String("Vault KMIP backend"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = kmip.NewSecretScope(ctx, "dev", &kmip.SecretScopeArgs{
 * 			Path:  _default.Path,
 * 			Scope: pulumi.String("dev"),
 * 			Force: pulumi.Bool(true),
 * 		})
 * 		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.kmip.SecretBackend;
 * import com.pulumi.vault.kmip.SecretBackendArgs;
 * import com.pulumi.vault.kmip.SecretScope;
 * import com.pulumi.vault.kmip.SecretScopeArgs;
 * 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 default_ = new SecretBackend("default", SecretBackendArgs.builder()
 *             .path("kmip")
 *             .description("Vault KMIP backend")
 *             .build());
 *         var dev = new SecretScope("dev", SecretScopeArgs.builder()
 *             .path(default_.path())
 *             .scope("dev")
 *             .force(true)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: vault:kmip:SecretBackend
 *     properties:
 *       path: kmip
 *       description: Vault KMIP backend
 *   dev:
 *     type: vault:kmip:SecretScope
 *     properties:
 *       path: ${default.path}
 *       scope: dev
 *       force: true
 * ```
 * 
 * ## Import
 * KMIP Secret scope can be imported using the `path`, e.g.
 * ```sh
 * $ pulumi import vault:kmip/secretScope:SecretScope dev kmip
 * ```
 * @property force Boolean field to force deletion even if there are managed objects in the scope.
 * @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 path The unique path this backend should be mounted at. Must
 * not begin or end with a `/`. Defaults to `kmip`.
 * @property scope Name of the scope.
 */
public data class SecretScopeArgs(
    public val force: Output? = null,
    public val namespace: Output? = null,
    public val path: Output? = null,
    public val scope: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.kmip.SecretScopeArgs =
        com.pulumi.vault.kmip.SecretScopeArgs.builder()
            .force(force?.applyValue({ args0 -> args0 }))
            .namespace(namespace?.applyValue({ args0 -> args0 }))
            .path(path?.applyValue({ args0 -> args0 }))
            .scope(scope?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SecretScopeArgs].
 */
@PulumiTagMarker
public class SecretScopeArgsBuilder internal constructor() {
    private var force: Output? = null

    private var namespace: Output? = null

    private var path: Output? = null

    private var scope: Output? = null

    /**
     * @param value Boolean field to force deletion even if there are managed objects in the scope.
     */
    @JvmName("ohsjmmciyoakktsg")
    public suspend fun force(`value`: Output) {
        this.force = 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("ddeiioeiyacwokqg")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value The unique path this backend should be mounted at. Must
     * not begin or end with a `/`. Defaults to `kmip`.
     */
    @JvmName("ybxhvgebbujhfugv")
    public suspend fun path(`value`: Output) {
        this.path = value
    }

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

    /**
     * @param value Boolean field to force deletion even if there are managed objects in the scope.
     */
    @JvmName("rvkgbtkslqolfqtg")
    public suspend fun force(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.force = 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("ntmcyhyqisokucav")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    /**
     * @param value The unique path this backend should be mounted at. Must
     * not begin or end with a `/`. Defaults to `kmip`.
     */
    @JvmName("jouroigtolwwejrt")
    public suspend fun path(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.path = mapped
    }

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

    internal fun build(): SecretScopeArgs = SecretScopeArgs(
        force = force,
        namespace = namespace,
        path = path,
        scope = scope,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy