com.pulumi.vault.pkiSecret.kotlin.SecretBackendCrlConfig.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.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [SecretBackendCrlConfig].
*/
@PulumiTagMarker
public class SecretBackendCrlConfigResourceBuilder internal constructor() {
public var name: String? = null
public var args: SecretBackendCrlConfigArgs = SecretBackendCrlConfigArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend SecretBackendCrlConfigArgsBuilder.() -> Unit) {
val builder = SecretBackendCrlConfigArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): SecretBackendCrlConfig {
val builtJavaResource =
com.pulumi.vault.pkiSecret.SecretBackendCrlConfig(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return SecretBackendCrlConfig(builtJavaResource)
}
}
/**
* Allows setting the duration for which the generated CRL should be marked valid. If the CRL is disabled, it will return a signed but zero-length CRL for any request. If enabled, it will re-build the CRL.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const pki = new vault.Mount("pki", {
* path: "%s",
* type: "pki",
* defaultLeaseTtlSeconds: 3600,
* maxLeaseTtlSeconds: 86400,
* });
* const crlConfig = new vault.pkisecret.SecretBackendCrlConfig("crl_config", {
* backend: pki.path,
* expiry: "72h",
* disable: false,
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* pki = vault.Mount("pki",
* path="%s",
* type="pki",
* default_lease_ttl_seconds=3600,
* max_lease_ttl_seconds=86400)
* crl_config = vault.pki_secret.SecretBackendCrlConfig("crl_config",
* backend=pki.path,
* expiry="72h",
* disable=False)
* ```
* ```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 = "%s",
* Type = "pki",
* DefaultLeaseTtlSeconds = 3600,
* MaxLeaseTtlSeconds = 86400,
* });
* var crlConfig = new Vault.PkiSecret.SecretBackendCrlConfig("crl_config", new()
* {
* Backend = pki.Path,
* Expiry = "72h",
* Disable = false,
* });
* });
* ```
* ```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("%s"),
* Type: pulumi.String("pki"),
* DefaultLeaseTtlSeconds: pulumi.Int(3600),
* MaxLeaseTtlSeconds: pulumi.Int(86400),
* })
* if err != nil {
* return err
* }
* _, err = pkiSecret.NewSecretBackendCrlConfig(ctx, "crl_config", &pkiSecret.SecretBackendCrlConfigArgs{
* Backend: pki.Path,
* Expiry: pulumi.String("72h"),
* Disable: pulumi.Bool(false),
* })
* 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.SecretBackendCrlConfig;
* import com.pulumi.vault.pkiSecret.SecretBackendCrlConfigArgs;
* 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("%s")
* .type("pki")
* .defaultLeaseTtlSeconds(3600)
* .maxLeaseTtlSeconds(86400)
* .build());
* var crlConfig = new SecretBackendCrlConfig("crlConfig", SecretBackendCrlConfigArgs.builder()
* .backend(pki.path())
* .expiry("72h")
* .disable(false)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* pki:
* type: vault:Mount
* properties:
* path: '%s'
* type: pki
* defaultLeaseTtlSeconds: 3600
* maxLeaseTtlSeconds: 86400
* crlConfig:
* type: vault:pkiSecret:SecretBackendCrlConfig
* name: crl_config
* properties:
* backend: ${pki.path}
* expiry: 72h
* disable: false
* ```
*
*/
public class SecretBackendCrlConfig internal constructor(
override val javaResource: com.pulumi.vault.pkiSecret.SecretBackendCrlConfig,
) : KotlinCustomResource(javaResource, SecretBackendCrlConfigMapper) {
/**
* Enables periodic rebuilding of the CRL upon expiry. **Vault 1.12+**
*/
public val autoRebuild: Output?
get() = javaResource.autoRebuild().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Grace period before CRL expiry to attempt rebuild of CRL. **Vault 1.12+**
*/
public val autoRebuildGracePeriod: Output
get() = javaResource.autoRebuildGracePeriod().applyValue({ args0 -> args0 })
/**
* The path the PKI secret backend is mounted at, with no leading or trailing `/`s.
*/
public val backend: Output
get() = javaResource.backend().applyValue({ args0 -> args0 })
/**
* Enable cross-cluster revocation request queues. **Vault 1.13+**
*/
public val crossClusterRevocation: Output
get() = javaResource.crossClusterRevocation().applyValue({ args0 -> args0 })
/**
* Interval to check for new revocations on, to regenerate the delta CRL.
*/
public val deltaRebuildInterval: Output
get() = javaResource.deltaRebuildInterval().applyValue({ args0 -> args0 })
/**
* Disables or enables CRL building.
*/
public val disable: Output?
get() = javaResource.disable().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Enables building of delta CRLs with up-to-date revocation information,
* augmenting the last complete CRL. **Vault 1.12+**
*/
public val enableDelta: Output?
get() = javaResource.enableDelta().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies the time until expiration.
*/
public val expiry: Output?
get() = javaResource.expiry().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* 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 val namespace: Output?
get() = javaResource.namespace().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Disables the OCSP responder in Vault. **Vault 1.12+**
*/
public val ocspDisable: Output?
get() = javaResource.ocspDisable().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The amount of time an OCSP response can be cached for, useful for OCSP stapling
* refresh durations. **Vault 1.12+**
*/
public val ocspExpiry: Output
get() = javaResource.ocspExpiry().applyValue({ args0 -> args0 })
/**
* Enables unified CRL and OCSP building. **Vault 1.13+**
*/
public val unifiedCrl: Output
get() = javaResource.unifiedCrl().applyValue({ args0 -> args0 })
/**
* Enables serving the unified CRL and OCSP on the existing, previously
* cluster-local paths. **Vault 1.13+**
*/
public val unifiedCrlOnExistingPaths: Output
get() = javaResource.unifiedCrlOnExistingPaths().applyValue({ args0 -> args0 })
}
public object SecretBackendCrlConfigMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.vault.pkiSecret.SecretBackendCrlConfig::class == javaResource::class
override fun map(javaResource: Resource): SecretBackendCrlConfig =
SecretBackendCrlConfig(javaResource as com.pulumi.vault.pkiSecret.SecretBackendCrlConfig)
}
/**
* @see [SecretBackendCrlConfig].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [SecretBackendCrlConfig].
*/
public suspend fun secretBackendCrlConfig(
name: String,
block: suspend SecretBackendCrlConfigResourceBuilder.() -> Unit,
): SecretBackendCrlConfig {
val builder = SecretBackendCrlConfigResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [SecretBackendCrlConfig].
* @param name The _unique_ name of the resulting resource.
*/
public fun secretBackendCrlConfig(name: String): SecretBackendCrlConfig {
val builder = SecretBackendCrlConfigResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy