com.pulumi.vault.pkiSecret.kotlin.SecretBackendConfigUrls.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
import kotlin.collections.List
/**
* Builder for [SecretBackendConfigUrls].
*/
@PulumiTagMarker
public class SecretBackendConfigUrlsResourceBuilder internal constructor() {
public var name: String? = null
public var args: SecretBackendConfigUrlsArgs = SecretBackendConfigUrlsArgs()
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 SecretBackendConfigUrlsArgsBuilder.() -> Unit) {
val builder = SecretBackendConfigUrlsArgsBuilder()
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(): SecretBackendConfigUrls {
val builtJavaResource =
com.pulumi.vault.pkiSecret.SecretBackendConfigUrls(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return SecretBackendConfigUrls(builtJavaResource)
}
}
/**
* Allows setting the issuing certificate endpoints, CRL distribution points, and OCSP server endpoints that will be encoded into issued certificates.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const root = new vault.Mount("root", {
* path: "pki-root",
* type: "pki",
* description: "root PKI",
* defaultLeaseTtlSeconds: 8640000,
* maxLeaseTtlSeconds: 8640000,
* });
* const example = new vault.pkisecret.SecretBackendConfigUrls("example", {
* backend: root.path,
* issuingCertificates: ["http://127.0.0.1:8200/v1/pki/ca"],
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* root = vault.Mount("root",
* path="pki-root",
* type="pki",
* description="root PKI",
* default_lease_ttl_seconds=8640000,
* max_lease_ttl_seconds=8640000)
* example = vault.pki_secret.SecretBackendConfigUrls("example",
* backend=root.path,
* issuing_certificates=["http://127.0.0.1:8200/v1/pki/ca"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var root = new Vault.Mount("root", new()
* {
* Path = "pki-root",
* Type = "pki",
* Description = "root PKI",
* DefaultLeaseTtlSeconds = 8640000,
* MaxLeaseTtlSeconds = 8640000,
* });
* var example = new Vault.PkiSecret.SecretBackendConfigUrls("example", new()
* {
* Backend = root.Path,
* IssuingCertificates = new[]
* {
* "http://127.0.0.1:8200/v1/pki/ca",
* },
* });
* });
* ```
* ```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 {
* root, err := vault.NewMount(ctx, "root", &vault.MountArgs{
* Path: pulumi.String("pki-root"),
* Type: pulumi.String("pki"),
* Description: pulumi.String("root PKI"),
* DefaultLeaseTtlSeconds: pulumi.Int(8640000),
* MaxLeaseTtlSeconds: pulumi.Int(8640000),
* })
* if err != nil {
* return err
* }
* _, err = pkiSecret.NewSecretBackendConfigUrls(ctx, "example", &pkiSecret.SecretBackendConfigUrlsArgs{
* Backend: root.Path,
* IssuingCertificates: pulumi.StringArray{
* pulumi.String("http://127.0.0.1:8200/v1/pki/ca"),
* },
* })
* 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.SecretBackendConfigUrls;
* import com.pulumi.vault.pkiSecret.SecretBackendConfigUrlsArgs;
* 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 root = new Mount("root", MountArgs.builder()
* .path("pki-root")
* .type("pki")
* .description("root PKI")
* .defaultLeaseTtlSeconds(8640000)
* .maxLeaseTtlSeconds(8640000)
* .build());
* var example = new SecretBackendConfigUrls("example", SecretBackendConfigUrlsArgs.builder()
* .backend(root.path())
* .issuingCertificates("http://127.0.0.1:8200/v1/pki/ca")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* root:
* type: vault:Mount
* properties:
* path: pki-root
* type: pki
* description: root PKI
* defaultLeaseTtlSeconds: 8.64e+06
* maxLeaseTtlSeconds: 8.64e+06
* example:
* type: vault:pkiSecret:SecretBackendConfigUrls
* properties:
* backend: ${root.path}
* issuingCertificates:
* - http://127.0.0.1:8200/v1/pki/ca
* ```
*
* ## Import
* The PKI config URLs can be imported using the resource's `id`.
* In the case of the example above the `id` would be `pki-root/config/urls`,
* where the `pki-root` component is the resource's `backend`, e.g.
* ```sh
* $ pulumi import vault:pkiSecret/secretBackendConfigUrls:SecretBackendConfigUrls example pki-root/config/urls
* ```
*/
public class SecretBackendConfigUrls internal constructor(
override val javaResource: com.pulumi.vault.pkiSecret.SecretBackendConfigUrls,
) : KotlinCustomResource(javaResource, SecretBackendConfigUrlsMapper) {
/**
* 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 })
/**
* Specifies the URL values for the CRL Distribution Points field.
*/
public val crlDistributionPoints: Output>?
get() = javaResource.crlDistributionPoints().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* Specifies that templating of AIA fields is allowed.
*/
public val enableTemplating: Output?
get() = javaResource.enableTemplating().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies the URL values for the Issuing Certificate field.
*/
public val issuingCertificates: Output>?
get() = javaResource.issuingCertificates().applyValue({ args0 ->
args0.map({ 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) })
/**
* Specifies the URL values for the OCSP Servers field.
*/
public val ocspServers: Output>?
get() = javaResource.ocspServers().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
}
public object SecretBackendConfigUrlsMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.vault.pkiSecret.SecretBackendConfigUrls::class == javaResource::class
override fun map(javaResource: Resource): SecretBackendConfigUrls =
SecretBackendConfigUrls(javaResource as com.pulumi.vault.pkiSecret.SecretBackendConfigUrls)
}
/**
* @see [SecretBackendConfigUrls].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [SecretBackendConfigUrls].
*/
public suspend fun secretBackendConfigUrls(
name: String,
block: suspend SecretBackendConfigUrlsResourceBuilder.() -> Unit,
): SecretBackendConfigUrls {
val builder = SecretBackendConfigUrlsResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [SecretBackendConfigUrls].
* @param name The _unique_ name of the resulting resource.
*/
public fun secretBackendConfigUrls(name: String): SecretBackendConfigUrls {
val builder = SecretBackendConfigUrlsResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy