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

com.pulumi.vault.secrets.kotlin.SyncVercelDestinationArgs.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.secrets.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.secrets.SyncVercelDestinationArgs.builder
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 vercel = new vault.secrets.SyncVercelDestination("vercel", {
 *     name: "vercel-dest",
 *     accessToken: accessToken,
 *     projectId: projectId,
 *     deploymentEnvironments: [
 *         "development",
 *         "preview",
 *         "production",
 *     ],
 *     secretNameTemplate: "vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_vault as vault
 * vercel = vault.secrets.SyncVercelDestination("vercel",
 *     name="vercel-dest",
 *     access_token=access_token,
 *     project_id=project_id,
 *     deployment_environments=[
 *         "development",
 *         "preview",
 *         "production",
 *     ],
 *     secret_name_template="vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Vault = Pulumi.Vault;
 * return await Deployment.RunAsync(() =>
 * {
 *     var vercel = new Vault.Secrets.SyncVercelDestination("vercel", new()
 *     {
 *         Name = "vercel-dest",
 *         AccessToken = accessToken,
 *         ProjectId = projectId,
 *         DeploymentEnvironments = new[]
 *         {
 *             "development",
 *             "preview",
 *             "production",
 *         },
 *         SecretNameTemplate = "vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/secrets"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := secrets.NewSyncVercelDestination(ctx, "vercel", &secrets.SyncVercelDestinationArgs{
 * 			Name:        pulumi.String("vercel-dest"),
 * 			AccessToken: pulumi.Any(accessToken),
 * 			ProjectId:   pulumi.Any(projectId),
 * 			DeploymentEnvironments: pulumi.StringArray{
 * 				pulumi.String("development"),
 * 				pulumi.String("preview"),
 * 				pulumi.String("production"),
 * 			},
 * 			SecretNameTemplate: pulumi.String("vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}"),
 * 		})
 * 		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.secrets.SyncVercelDestination;
 * import com.pulumi.vault.secrets.SyncVercelDestinationArgs;
 * 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 vercel = new SyncVercelDestination("vercel", SyncVercelDestinationArgs.builder()
 *             .name("vercel-dest")
 *             .accessToken(accessToken)
 *             .projectId(projectId)
 *             .deploymentEnvironments(
 *                 "development",
 *                 "preview",
 *                 "production")
 *             .secretNameTemplate("vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   vercel:
 *     type: vault:secrets:SyncVercelDestination
 *     properties:
 *       name: vercel-dest
 *       accessToken: ${accessToken}
 *       projectId: ${projectId}
 *       deploymentEnvironments:
 *         - development
 *         - preview
 *         - production
 *       secretNameTemplate: vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}
 * ```
 * 
 * ## Import
 * GitHub Secrets sync destinations can be imported using the `name`, e.g.
 * ```sh
 * $ pulumi import vault:secrets/syncVercelDestination:SyncVercelDestination vercel vercel-dest
 * ```
 * @property accessToken Vercel API access token with the permissions to manage environment
 * variables.
 * @property deploymentEnvironments Deployment environments where the environment variables
 * are available. Accepts `development`, `preview` and `production`.
 * @property granularity Determines what level of information is synced as a distinct resource
 * at the destination. Supports `secret-path` and `secret-key`.
 * @property name Unique name of the GitHub destination.
 * @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).
 * @property projectId Project ID where to manage environment variables.
 * @property secretNameTemplate Template describing how to generate external secret names.
 * Supports a subset of the Go Template syntax.
 * @property teamId Team ID where to manage environment variables.
 */
public data class SyncVercelDestinationArgs(
    public val accessToken: Output? = null,
    public val deploymentEnvironments: Output>? = null,
    public val granularity: Output? = null,
    public val name: Output? = null,
    public val namespace: Output? = null,
    public val projectId: Output? = null,
    public val secretNameTemplate: Output? = null,
    public val teamId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.secrets.SyncVercelDestinationArgs =
        com.pulumi.vault.secrets.SyncVercelDestinationArgs.builder()
            .accessToken(accessToken?.applyValue({ args0 -> args0 }))
            .deploymentEnvironments(
                deploymentEnvironments?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .granularity(granularity?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .namespace(namespace?.applyValue({ args0 -> args0 }))
            .projectId(projectId?.applyValue({ args0 -> args0 }))
            .secretNameTemplate(secretNameTemplate?.applyValue({ args0 -> args0 }))
            .teamId(teamId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SyncVercelDestinationArgs].
 */
@PulumiTagMarker
public class SyncVercelDestinationArgsBuilder internal constructor() {
    private var accessToken: Output? = null

    private var deploymentEnvironments: Output>? = null

    private var granularity: Output? = null

    private var name: Output? = null

    private var namespace: Output? = null

    private var projectId: Output? = null

    private var secretNameTemplate: Output? = null

    private var teamId: Output? = null

    /**
     * @param value Vercel API access token with the permissions to manage environment
     * variables.
     */
    @JvmName("ufpabmycxepkgwtm")
    public suspend fun accessToken(`value`: Output) {
        this.accessToken = value
    }

    /**
     * @param value Deployment environments where the environment variables
     * are available. Accepts `development`, `preview` and `production`.
     */
    @JvmName("ioddrccywnkdevbt")
    public suspend fun deploymentEnvironments(`value`: Output>) {
        this.deploymentEnvironments = value
    }

    @JvmName("wwvgvsnyakxfqenu")
    public suspend fun deploymentEnvironments(vararg values: Output) {
        this.deploymentEnvironments = Output.all(values.asList())
    }

    /**
     * @param values Deployment environments where the environment variables
     * are available. Accepts `development`, `preview` and `production`.
     */
    @JvmName("sqwnlpaprcipfqxe")
    public suspend fun deploymentEnvironments(values: List>) {
        this.deploymentEnvironments = Output.all(values)
    }

    /**
     * @param value Determines what level of information is synced as a distinct resource
     * at the destination. Supports `secret-path` and `secret-key`.
     */
    @JvmName("ecdeiuhtuqxpgowx")
    public suspend fun granularity(`value`: Output) {
        this.granularity = value
    }

    /**
     * @param value Unique name of the GitHub destination.
     */
    @JvmName("mijhhynntcajntxg")
    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).
     */
    @JvmName("xaqyhxxgihniauyy")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value Project ID where to manage environment variables.
     */
    @JvmName("awagcausbrmwaioy")
    public suspend fun projectId(`value`: Output) {
        this.projectId = value
    }

    /**
     * @param value Template describing how to generate external secret names.
     * Supports a subset of the Go Template syntax.
     */
    @JvmName("jsxppkogxqvhbjfb")
    public suspend fun secretNameTemplate(`value`: Output) {
        this.secretNameTemplate = value
    }

    /**
     * @param value Team ID where to manage environment variables.
     */
    @JvmName("khjqlnbxyvmntiun")
    public suspend fun teamId(`value`: Output) {
        this.teamId = value
    }

    /**
     * @param value Vercel API access token with the permissions to manage environment
     * variables.
     */
    @JvmName("mrublfnvbesixfof")
    public suspend fun accessToken(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessToken = mapped
    }

    /**
     * @param value Deployment environments where the environment variables
     * are available. Accepts `development`, `preview` and `production`.
     */
    @JvmName("fngurcviufsagpst")
    public suspend fun deploymentEnvironments(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deploymentEnvironments = mapped
    }

    /**
     * @param values Deployment environments where the environment variables
     * are available. Accepts `development`, `preview` and `production`.
     */
    @JvmName("xiwwoeaypmrrtygf")
    public suspend fun deploymentEnvironments(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.deploymentEnvironments = mapped
    }

    /**
     * @param value Determines what level of information is synced as a distinct resource
     * at the destination. Supports `secret-path` and `secret-key`.
     */
    @JvmName("paudoacgtkdaapfm")
    public suspend fun granularity(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.granularity = mapped
    }

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

    /**
     * @param value Project ID where to manage environment variables.
     */
    @JvmName("hfbxgcrvxjgvdkfo")
    public suspend fun projectId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.projectId = mapped
    }

    /**
     * @param value Template describing how to generate external secret names.
     * Supports a subset of the Go Template syntax.
     */
    @JvmName("irxmxlvileedouwj")
    public suspend fun secretNameTemplate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secretNameTemplate = mapped
    }

    /**
     * @param value Team ID where to manage environment variables.
     */
    @JvmName("cundxskwospcfxej")
    public suspend fun teamId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.teamId = mapped
    }

    internal fun build(): SyncVercelDestinationArgs = SyncVercelDestinationArgs(
        accessToken = accessToken,
        deploymentEnvironments = deploymentEnvironments,
        granularity = granularity,
        name = name,
        namespace = namespace,
        projectId = projectId,
        secretNameTemplate = secretNameTemplate,
        teamId = teamId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy