com.pulumi.vault.pkiSecret.kotlin.BackendConfigCluster.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 [BackendConfigCluster].
*/
@PulumiTagMarker
public class BackendConfigClusterResourceBuilder internal constructor() {
public var name: String? = null
public var args: BackendConfigClusterArgs = BackendConfigClusterArgs()
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 BackendConfigClusterArgsBuilder.() -> Unit) {
val builder = BackendConfigClusterArgsBuilder()
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(): BackendConfigCluster {
val builtJavaResource = com.pulumi.vault.pkiSecret.BackendConfigCluster(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return BackendConfigCluster(builtJavaResource)
}
}
/**
* Allows setting the cluster-local's API mount path and AIA distribution point on a particular performance replication cluster.
* ## 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.BackendConfigCluster("example", {
* backend: root.path,
* path: "http://127.0.0.1:8200/v1/pki-root",
* aiaPath: "http://127.0.0.1:8200/v1/pki-root",
* });
* ```
* ```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.BackendConfigCluster("example",
* backend=root.path,
* path="http://127.0.0.1:8200/v1/pki-root",
* aia_path="http://127.0.0.1:8200/v1/pki-root")
* ```
* ```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.BackendConfigCluster("example", new()
* {
* Backend = root.Path,
* Path = "http://127.0.0.1:8200/v1/pki-root",
* AiaPath = "http://127.0.0.1:8200/v1/pki-root",
* });
* });
* ```
* ```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.NewBackendConfigCluster(ctx, "example", &pkiSecret.BackendConfigClusterArgs{
* Backend: root.Path,
* Path: pulumi.String("http://127.0.0.1:8200/v1/pki-root"),
* AiaPath: pulumi.String("http://127.0.0.1:8200/v1/pki-root"),
* })
* 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.BackendConfigCluster;
* import com.pulumi.vault.pkiSecret.BackendConfigClusterArgs;
* 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 BackendConfigCluster("example", BackendConfigClusterArgs.builder()
* .backend(root.path())
* .path("http://127.0.0.1:8200/v1/pki-root")
* .aiaPath("http://127.0.0.1:8200/v1/pki-root")
* .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:BackendConfigCluster
* properties:
* backend: ${root.path}
* path: http://127.0.0.1:8200/v1/pki-root
* aiaPath: http://127.0.0.1:8200/v1/pki-root
* ```
*
* ## Import
* The PKI config cluster can be imported using the resource's `id`.
* In the case of the example above the `id` would be `pki-root/config/cluster`,
* where the `pki-root` component is the resource's `backend`, e.g.
* ```sh
* $ pulumi import vault:pkiSecret/backendConfigCluster:BackendConfigCluster example pki-root/config/cluster
* ```
*/
public class BackendConfigCluster internal constructor(
override val javaResource: com.pulumi.vault.pkiSecret.BackendConfigCluster,
) : KotlinCustomResource(javaResource, BackendConfigClusterMapper) {
/**
* Specifies the path to this performance replication cluster's AIA distribution point.
*/
public val aiaPath: Output?
get() = javaResource.aiaPath().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* 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 })
/**
* 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 path to this performance replication cluster's API mount path.
*/
public val path: Output?
get() = javaResource.path().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}
public object BackendConfigClusterMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.vault.pkiSecret.BackendConfigCluster::class == javaResource::class
override fun map(javaResource: Resource): BackendConfigCluster = BackendConfigCluster(
javaResource
as com.pulumi.vault.pkiSecret.BackendConfigCluster,
)
}
/**
* @see [BackendConfigCluster].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [BackendConfigCluster].
*/
public suspend fun backendConfigCluster(
name: String,
block: suspend BackendConfigClusterResourceBuilder.() -> Unit,
): BackendConfigCluster {
val builder = BackendConfigClusterResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [BackendConfigCluster].
* @param name The _unique_ name of the resulting resource.
*/
public fun backendConfigCluster(name: String): BackendConfigCluster {
val builder = BackendConfigClusterResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy