com.pulumi.vault.pkiSecret.kotlin.SecretBackendConfigIssuersArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-vault-kotlin Show documentation
Show all versions of pulumi-vault-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.vault.pkiSecret.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.pkiSecret.SecretBackendConfigIssuersArgs.builder
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const pki = new vault.Mount("pki", {
* path: "pki",
* type: "pki",
* defaultLeaseTtlSeconds: 3600,
* maxLeaseTtlSeconds: 86400,
* });
* const root = new vault.pkisecret.SecretBackendRootCert("root", {
* backend: pki.path,
* type: "internal",
* commonName: "test",
* ttl: "86400",
* });
* const example = new vault.pkisecret.SecretBackendIssuer("example", {
* backend: root.backend,
* issuerRef: root.issuerId,
* issuerName: "example-issuer",
* });
* const config = new vault.pkisecret.SecretBackendConfigIssuers("config", {
* backend: pki.path,
* "default": example.issuerId,
* defaultFollowsLatestIssuer: true,
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* pki = vault.Mount("pki",
* path="pki",
* type="pki",
* default_lease_ttl_seconds=3600,
* max_lease_ttl_seconds=86400)
* root = vault.pki_secret.SecretBackendRootCert("root",
* backend=pki.path,
* type="internal",
* common_name="test",
* ttl="86400")
* example = vault.pki_secret.SecretBackendIssuer("example",
* backend=root.backend,
* issuer_ref=root.issuer_id,
* issuer_name="example-issuer")
* config = vault.pki_secret.SecretBackendConfigIssuers("config",
* backend=pki.path,
* default=example.issuer_id,
* default_follows_latest_issuer=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var pki = new Vault.Mount("pki", new()
* {
* Path = "pki",
* Type = "pki",
* DefaultLeaseTtlSeconds = 3600,
* MaxLeaseTtlSeconds = 86400,
* });
* var root = new Vault.PkiSecret.SecretBackendRootCert("root", new()
* {
* Backend = pki.Path,
* Type = "internal",
* CommonName = "test",
* Ttl = "86400",
* });
* var example = new Vault.PkiSecret.SecretBackendIssuer("example", new()
* {
* Backend = root.Backend,
* IssuerRef = root.IssuerId,
* IssuerName = "example-issuer",
* });
* var config = new Vault.PkiSecret.SecretBackendConfigIssuers("config", new()
* {
* Backend = pki.Path,
* Default = example.IssuerId,
* DefaultFollowsLatestIssuer = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault/pkiSecret"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* pki, err := vault.NewMount(ctx, "pki", &vault.MountArgs{
* Path: pulumi.String("pki"),
* Type: pulumi.String("pki"),
* DefaultLeaseTtlSeconds: pulumi.Int(3600),
* MaxLeaseTtlSeconds: pulumi.Int(86400),
* })
* if err != nil {
* return err
* }
* root, err := pkiSecret.NewSecretBackendRootCert(ctx, "root", &pkiSecret.SecretBackendRootCertArgs{
* Backend: pki.Path,
* Type: pulumi.String("internal"),
* CommonName: pulumi.String("test"),
* Ttl: pulumi.String("86400"),
* })
* if err != nil {
* return err
* }
* example, err := pkiSecret.NewSecretBackendIssuer(ctx, "example", &pkiSecret.SecretBackendIssuerArgs{
* Backend: root.Backend,
* IssuerRef: root.IssuerId,
* IssuerName: pulumi.String("example-issuer"),
* })
* if err != nil {
* return err
* }
* _, err = pkiSecret.NewSecretBackendConfigIssuers(ctx, "config", &pkiSecret.SecretBackendConfigIssuersArgs{
* Backend: pki.Path,
* Default: example.IssuerId,
* DefaultFollowsLatestIssuer: 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.Mount;
* import com.pulumi.vault.MountArgs;
* import com.pulumi.vault.pkiSecret.SecretBackendRootCert;
* import com.pulumi.vault.pkiSecret.SecretBackendRootCertArgs;
* import com.pulumi.vault.pkiSecret.SecretBackendIssuer;
* import com.pulumi.vault.pkiSecret.SecretBackendIssuerArgs;
* import com.pulumi.vault.pkiSecret.SecretBackendConfigIssuers;
* import com.pulumi.vault.pkiSecret.SecretBackendConfigIssuersArgs;
* 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 pki = new Mount("pki", MountArgs.builder()
* .path("pki")
* .type("pki")
* .defaultLeaseTtlSeconds(3600)
* .maxLeaseTtlSeconds(86400)
* .build());
* var root = new SecretBackendRootCert("root", SecretBackendRootCertArgs.builder()
* .backend(pki.path())
* .type("internal")
* .commonName("test")
* .ttl("86400")
* .build());
* var example = new SecretBackendIssuer("example", SecretBackendIssuerArgs.builder()
* .backend(root.backend())
* .issuerRef(root.issuerId())
* .issuerName("example-issuer")
* .build());
* var config = new SecretBackendConfigIssuers("config", SecretBackendConfigIssuersArgs.builder()
* .backend(pki.path())
* .default_(example.issuerId())
* .defaultFollowsLatestIssuer(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* pki:
* type: vault:Mount
* properties:
* path: pki
* type: pki
* defaultLeaseTtlSeconds: 3600
* maxLeaseTtlSeconds: 86400
* root:
* type: vault:pkiSecret:SecretBackendRootCert
* properties:
* backend: ${pki.path}
* type: internal
* commonName: test
* ttl: '86400'
* example:
* type: vault:pkiSecret:SecretBackendIssuer
* properties:
* backend: ${root.backend}
* issuerRef: ${root.issuerId}
* issuerName: example-issuer
* config:
* type: vault:pkiSecret:SecretBackendConfigIssuers
* properties:
* backend: ${pki.path}
* default: ${example.issuerId}
* defaultFollowsLatestIssuer: true
* ```
*
* ## Import
* PKI secret backend config issuers can be imported using the path, e.g.
* ```sh
* $ pulumi import vault:pkiSecret/secretBackendConfigIssuers:SecretBackendConfigIssuers config pki/config/issuers
* ```
* @property backend The path the PKI secret backend is mounted at, with no
* leading or trailing `/`s.
* @property default Specifies the default issuer by ID.
* @property defaultFollowsLatestIssuer Specifies whether a root creation
* or an issuer import operation updates the default issuer to the newly added issuer.
* @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 SecretBackendConfigIssuersArgs(
public val backend: Output? = null,
public val default: Output? = null,
public val defaultFollowsLatestIssuer: Output? = null,
public val namespace: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.vault.pkiSecret.SecretBackendConfigIssuersArgs =
com.pulumi.vault.pkiSecret.SecretBackendConfigIssuersArgs.builder()
.backend(backend?.applyValue({ args0 -> args0 }))
.default_(default?.applyValue({ args0 -> args0 }))
.defaultFollowsLatestIssuer(defaultFollowsLatestIssuer?.applyValue({ args0 -> args0 }))
.namespace(namespace?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SecretBackendConfigIssuersArgs].
*/
@PulumiTagMarker
public class SecretBackendConfigIssuersArgsBuilder internal constructor() {
private var backend: Output? = null
private var default: Output? = null
private var defaultFollowsLatestIssuer: Output? = null
private var namespace: Output? = null
/**
* @param value The path the PKI secret backend is mounted at, with no
* leading or trailing `/`s.
*/
@JvmName("qmnukfqtutlpcdur")
public suspend fun backend(`value`: Output) {
this.backend = value
}
/**
* @param value Specifies the default issuer by ID.
*/
@JvmName("ortgyegggwmeyylx")
public suspend fun default(`value`: Output) {
this.default = value
}
/**
* @param value Specifies whether a root creation
* or an issuer import operation updates the default issuer to the newly added issuer.
*/
@JvmName("ypukltoldokxfasn")
public suspend fun defaultFollowsLatestIssuer(`value`: Output) {
this.defaultFollowsLatestIssuer = 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("jvfungtjrvkwendi")
public suspend fun namespace(`value`: Output) {
this.namespace = value
}
/**
* @param value The path the PKI secret backend is mounted at, with no
* leading or trailing `/`s.
*/
@JvmName("uhiflhlcegocybkp")
public suspend fun backend(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.backend = mapped
}
/**
* @param value Specifies the default issuer by ID.
*/
@JvmName("scgujcacwkrhunrn")
public suspend fun default(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.default = mapped
}
/**
* @param value Specifies whether a root creation
* or an issuer import operation updates the default issuer to the newly added issuer.
*/
@JvmName("keodvwarfxjaaqfe")
public suspend fun defaultFollowsLatestIssuer(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.defaultFollowsLatestIssuer = 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("rsmrhojhimhjyiiy")
public suspend fun namespace(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.namespace = mapped
}
internal fun build(): SecretBackendConfigIssuersArgs = SecretBackendConfigIssuersArgs(
backend = backend,
default = default,
defaultFollowsLatestIssuer = defaultFollowsLatestIssuer,
namespace = namespace,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy