
com.pulumi.vault.ad.kotlin.SecretLibraryArgs.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.ad.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.ad.SecretLibraryArgs.builder
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const config = new vault.ad.SecretBackend("config", {
* backend: "ad",
* binddn: "CN=Administrator,CN=Users,DC=corp,DC=example,DC=net",
* bindpass: "SuperSecretPassw0rd",
* url: "ldaps://ad",
* insecureTls: true,
* userdn: "CN=Users,DC=corp,DC=example,DC=net",
* });
* const qa = new vault.ad.SecretLibrary("qa", {
* backend: config.backend,
* name: "qa",
* serviceAccountNames: [
* "Bob",
* "Mary",
* ],
* ttl: 60,
* disableCheckInEnforcement: true,
* maxTtl: 120,
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* config = vault.ad.SecretBackend("config",
* backend="ad",
* binddn="CN=Administrator,CN=Users,DC=corp,DC=example,DC=net",
* bindpass="SuperSecretPassw0rd",
* url="ldaps://ad",
* insecure_tls=True,
* userdn="CN=Users,DC=corp,DC=example,DC=net")
* qa = vault.ad.SecretLibrary("qa",
* backend=config.backend,
* name="qa",
* service_account_names=[
* "Bob",
* "Mary",
* ],
* ttl=60,
* disable_check_in_enforcement=True,
* max_ttl=120)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var config = new Vault.AD.SecretBackend("config", new()
* {
* Backend = "ad",
* Binddn = "CN=Administrator,CN=Users,DC=corp,DC=example,DC=net",
* Bindpass = "SuperSecretPassw0rd",
* Url = "ldaps://ad",
* InsecureTls = true,
* Userdn = "CN=Users,DC=corp,DC=example,DC=net",
* });
* var qa = new Vault.AD.SecretLibrary("qa", new()
* {
* Backend = config.Backend,
* Name = "qa",
* ServiceAccountNames = new[]
* {
* "Bob",
* "Mary",
* },
* Ttl = 60,
* DisableCheckInEnforcement = true,
* MaxTtl = 120,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault/ad"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* config, err := ad.NewSecretBackend(ctx, "config", &ad.SecretBackendArgs{
* Backend: pulumi.String("ad"),
* Binddn: pulumi.String("CN=Administrator,CN=Users,DC=corp,DC=example,DC=net"),
* Bindpass: pulumi.String("SuperSecretPassw0rd"),
* Url: pulumi.String("ldaps://ad"),
* InsecureTls: pulumi.Bool(true),
* Userdn: pulumi.String("CN=Users,DC=corp,DC=example,DC=net"),
* })
* if err != nil {
* return err
* }
* _, err = ad.NewSecretLibrary(ctx, "qa", &ad.SecretLibraryArgs{
* Backend: config.Backend,
* Name: pulumi.String("qa"),
* ServiceAccountNames: pulumi.StringArray{
* pulumi.String("Bob"),
* pulumi.String("Mary"),
* },
* Ttl: pulumi.Int(60),
* DisableCheckInEnforcement: pulumi.Bool(true),
* MaxTtl: pulumi.Int(120),
* })
* 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.ad.SecretBackend;
* import com.pulumi.vault.ad.SecretBackendArgs;
* import com.pulumi.vault.ad.SecretLibrary;
* import com.pulumi.vault.ad.SecretLibraryArgs;
* 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 config = new SecretBackend("config", SecretBackendArgs.builder()
* .backend("ad")
* .binddn("CN=Administrator,CN=Users,DC=corp,DC=example,DC=net")
* .bindpass("SuperSecretPassw0rd")
* .url("ldaps://ad")
* .insecureTls("true")
* .userdn("CN=Users,DC=corp,DC=example,DC=net")
* .build());
* var qa = new SecretLibrary("qa", SecretLibraryArgs.builder()
* .backend(config.backend())
* .name("qa")
* .serviceAccountNames(
* "Bob",
* "Mary")
* .ttl(60)
* .disableCheckInEnforcement(true)
* .maxTtl(120)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* config:
* type: vault:ad:SecretBackend
* properties:
* backend: ad
* binddn: CN=Administrator,CN=Users,DC=corp,DC=example,DC=net
* bindpass: SuperSecretPassw0rd
* url: ldaps://ad
* insecureTls: 'true'
* userdn: CN=Users,DC=corp,DC=example,DC=net
* qa:
* type: vault:ad:SecretLibrary
* properties:
* backend: ${config.backend}
* name: qa
* serviceAccountNames:
* - Bob
* - Mary
* ttl: 60
* disableCheckInEnforcement: true
* maxTtl: 120
* ```
*
* ## Import
* AD secret backend libraries can be imported using the `path`, e.g.
* ```sh
* $ pulumi import vault:ad/secretLibrary:SecretLibrary role ad/library/bob
* ```
* @property backend The path the AD secret backend is mounted at,
* with no leading or trailing `/`s.
* @property disableCheckInEnforcement Disable enforcing that service accounts must be checked in by the entity or client token that checked them out.
* @property maxTtl The maximum password time-to-live in seconds. Defaults to the configuration
* max_ttl if not provided.
* @property name The name to identify this set of service accounts.
* Must be unique within the backend.
* @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 serviceAccountNames Specifies the slice of service accounts mapped to this set.
* @property ttl The password time-to-live in seconds. Defaults to the configuration
* ttl if not provided.
*/
public data class SecretLibraryArgs(
public val backend: Output? = null,
public val disableCheckInEnforcement: Output? = null,
public val maxTtl: Output? = null,
public val name: Output? = null,
public val namespace: Output? = null,
public val serviceAccountNames: Output>? = null,
public val ttl: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.vault.ad.SecretLibraryArgs =
com.pulumi.vault.ad.SecretLibraryArgs.builder()
.backend(backend?.applyValue({ args0 -> args0 }))
.disableCheckInEnforcement(disableCheckInEnforcement?.applyValue({ args0 -> args0 }))
.maxTtl(maxTtl?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.namespace(namespace?.applyValue({ args0 -> args0 }))
.serviceAccountNames(serviceAccountNames?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.ttl(ttl?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SecretLibraryArgs].
*/
@PulumiTagMarker
public class SecretLibraryArgsBuilder internal constructor() {
private var backend: Output? = null
private var disableCheckInEnforcement: Output? = null
private var maxTtl: Output? = null
private var name: Output? = null
private var namespace: Output? = null
private var serviceAccountNames: Output>? = null
private var ttl: Output? = null
/**
* @param value The path the AD secret backend is mounted at,
* with no leading or trailing `/`s.
*/
@JvmName("gsxakvutdsxlpcns")
public suspend fun backend(`value`: Output) {
this.backend = value
}
/**
* @param value Disable enforcing that service accounts must be checked in by the entity or client token that checked them out.
*/
@JvmName("cojycnixkpepnrdp")
public suspend fun disableCheckInEnforcement(`value`: Output) {
this.disableCheckInEnforcement = value
}
/**
* @param value The maximum password time-to-live in seconds. Defaults to the configuration
* max_ttl if not provided.
*/
@JvmName("qyfnpgmypyfapixh")
public suspend fun maxTtl(`value`: Output) {
this.maxTtl = value
}
/**
* @param value The name to identify this set of service accounts.
* Must be unique within the backend.
*/
@JvmName("wljagtfeiiriaxiy")
public suspend fun name(`value`: Output) {
this.name = 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("jbxxfifkvsaaoayn")
public suspend fun namespace(`value`: Output) {
this.namespace = value
}
/**
* @param value Specifies the slice of service accounts mapped to this set.
*/
@JvmName("deunbmllkdglspwj")
public suspend fun serviceAccountNames(`value`: Output>) {
this.serviceAccountNames = value
}
@JvmName("hhjgjpnkcbplqygg")
public suspend fun serviceAccountNames(vararg values: Output) {
this.serviceAccountNames = Output.all(values.asList())
}
/**
* @param values Specifies the slice of service accounts mapped to this set.
*/
@JvmName("sfwdioglmuvgfxrv")
public suspend fun serviceAccountNames(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy