All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.vault.terraformcloud.kotlin.SecretRoleArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.4.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.vault.terraformcloud.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.terraformcloud.SecretRoleArgs.builder
import kotlin.Int
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 test = new vault.terraformcloud.SecretBackend("test", {
 *     backend: "terraform",
 *     description: "Manages the Terraform Cloud backend",
 *     token: "V0idfhi2iksSDU234ucdbi2nidsi...",
 * });
 * const example = new vault.terraformcloud.SecretRole("example", {
 *     backend: test.backend,
 *     name: "test-role",
 *     organization: "example-organization-name",
 *     teamId: "team-ieF4isC...",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_vault as vault
 * test = vault.terraformcloud.SecretBackend("test",
 *     backend="terraform",
 *     description="Manages the Terraform Cloud backend",
 *     token="V0idfhi2iksSDU234ucdbi2nidsi...")
 * example = vault.terraformcloud.SecretRole("example",
 *     backend=test.backend,
 *     name="test-role",
 *     organization="example-organization-name",
 *     team_id="team-ieF4isC...")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Vault = Pulumi.Vault;
 * return await Deployment.RunAsync(() =>
 * {
 *     var test = new Vault.TerraformCloud.SecretBackend("test", new()
 *     {
 *         Backend = "terraform",
 *         Description = "Manages the Terraform Cloud backend",
 *         Token = "V0idfhi2iksSDU234ucdbi2nidsi...",
 *     });
 *     var example = new Vault.TerraformCloud.SecretRole("example", new()
 *     {
 *         Backend = test.Backend,
 *         Name = "test-role",
 *         Organization = "example-organization-name",
 *         TeamId = "team-ieF4isC...",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/terraformcloud"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		test, err := terraformcloud.NewSecretBackend(ctx, "test", &terraformcloud.SecretBackendArgs{
 * 			Backend:     pulumi.String("terraform"),
 * 			Description: pulumi.String("Manages the Terraform Cloud backend"),
 * 			Token:       pulumi.String("V0idfhi2iksSDU234ucdbi2nidsi..."),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = terraformcloud.NewSecretRole(ctx, "example", &terraformcloud.SecretRoleArgs{
 * 			Backend:      test.Backend,
 * 			Name:         pulumi.String("test-role"),
 * 			Organization: pulumi.String("example-organization-name"),
 * 			TeamId:       pulumi.String("team-ieF4isC..."),
 * 		})
 * 		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.terraformcloud.SecretBackend;
 * import com.pulumi.vault.terraformcloud.SecretBackendArgs;
 * import com.pulumi.vault.terraformcloud.SecretRole;
 * import com.pulumi.vault.terraformcloud.SecretRoleArgs;
 * 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 test = new SecretBackend("test", SecretBackendArgs.builder()
 *             .backend("terraform")
 *             .description("Manages the Terraform Cloud backend")
 *             .token("V0idfhi2iksSDU234ucdbi2nidsi...")
 *             .build());
 *         var example = new SecretRole("example", SecretRoleArgs.builder()
 *             .backend(test.backend())
 *             .name("test-role")
 *             .organization("example-organization-name")
 *             .teamId("team-ieF4isC...")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   test:
 *     type: vault:terraformcloud:SecretBackend
 *     properties:
 *       backend: terraform
 *       description: Manages the Terraform Cloud backend
 *       token: V0idfhi2iksSDU234ucdbi2nidsi...
 *   example:
 *     type: vault:terraformcloud:SecretRole
 *     properties:
 *       backend: ${test.backend}
 *       name: test-role
 *       organization: example-organization-name
 *       teamId: team-ieF4isC...
 * ```
 * 
 * ## Import
 * Terraform Cloud secret backend roles can be imported using the `backend`, `/roles/`, and the `name` e.g.
 * ```sh
 * $ pulumi import vault:terraformcloud/secretRole:SecretRole example terraform/roles/my-role
 * ```
 * @property backend
 * @property maxTtl Maximum TTL for leases associated with this role, in seconds.
 * @property name
 * @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 organization
 * @property teamId
 * @property ttl Specifies the TTL for this role.
 * @property userId
 */
public data class SecretRoleArgs(
    public val backend: Output? = null,
    public val maxTtl: Output? = null,
    public val name: Output? = null,
    public val namespace: Output? = null,
    public val organization: Output? = null,
    public val teamId: Output? = null,
    public val ttl: Output? = null,
    public val userId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.terraformcloud.SecretRoleArgs =
        com.pulumi.vault.terraformcloud.SecretRoleArgs.builder()
            .backend(backend?.applyValue({ args0 -> args0 }))
            .maxTtl(maxTtl?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .namespace(namespace?.applyValue({ args0 -> args0 }))
            .organization(organization?.applyValue({ args0 -> args0 }))
            .teamId(teamId?.applyValue({ args0 -> args0 }))
            .ttl(ttl?.applyValue({ args0 -> args0 }))
            .userId(userId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SecretRoleArgs].
 */
@PulumiTagMarker
public class SecretRoleArgsBuilder internal constructor() {
    private var backend: Output? = null

    private var maxTtl: Output? = null

    private var name: Output? = null

    private var namespace: Output? = null

    private var organization: Output? = null

    private var teamId: Output? = null

    private var ttl: Output? = null

    private var userId: Output? = null

    /**
     * @param value
     */
    @JvmName("uoopkjthmdhremdk")
    public suspend fun backend(`value`: Output) {
        this.backend = value
    }

    /**
     * @param value Maximum TTL for leases associated with this role, in seconds.
     */
    @JvmName("rndijhpddalfcqcj")
    public suspend fun maxTtl(`value`: Output) {
        this.maxTtl = value
    }

    /**
     * @param value
     */
    @JvmName("yshbyvnqwhhwysuh")
    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("dgdmkosgtiombkwx")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value
     */
    @JvmName("sbdmghouhagsmgix")
    public suspend fun organization(`value`: Output) {
        this.organization = value
    }

    /**
     * @param value
     */
    @JvmName("pcplhdfnuqqqqvga")
    public suspend fun teamId(`value`: Output) {
        this.teamId = value
    }

    /**
     * @param value Specifies the TTL for this role.
     */
    @JvmName("wnydlljeausovbpm")
    public suspend fun ttl(`value`: Output) {
        this.ttl = value
    }

    /**
     * @param value
     */
    @JvmName("dieomavcaqsxifxt")
    public suspend fun userId(`value`: Output) {
        this.userId = value
    }

    /**
     * @param value
     */
    @JvmName("nmfaglymdbjkyocq")
    public suspend fun backend(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backend = mapped
    }

    /**
     * @param value Maximum TTL for leases associated with this role, in seconds.
     */
    @JvmName("uqgmhpgqgnwgtcun")
    public suspend fun maxTtl(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxTtl = mapped
    }

    /**
     * @param value
     */
    @JvmName("jocmtupammpvgrkr")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = 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("dtcoeysydepovngw")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    /**
     * @param value
     */
    @JvmName("mgltqnneinydtsos")
    public suspend fun organization(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.organization = mapped
    }

    /**
     * @param value
     */
    @JvmName("ubimjkbbawuucili")
    public suspend fun teamId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.teamId = mapped
    }

    /**
     * @param value Specifies the TTL for this role.
     */
    @JvmName("eycxdpwhsdmksagp")
    public suspend fun ttl(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ttl = mapped
    }

    /**
     * @param value
     */
    @JvmName("gfsymefyhdnbkvdh")
    public suspend fun userId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userId = mapped
    }

    internal fun build(): SecretRoleArgs = SecretRoleArgs(
        backend = backend,
        maxTtl = maxTtl,
        name = name,
        namespace = namespace,
        organization = organization,
        teamId = teamId,
        ttl = ttl,
        userId = userId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy