com.pulumi.vault.secrets.kotlin.SyncVercelDestinationArgs.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.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
© 2015 - 2025 Weber Informatics LLC | Privacy Policy