1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. secrets
  5. SyncVercelDestination
HashiCorp Vault v6.1.0 published on Thursday, Apr 4, 2024 by Pulumi

vault.secrets.SyncVercelDestination

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.1.0 published on Thursday, Apr 4, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const vercel = new vault.secrets.SyncVercelDestination("vercel", {
        accessToken: _var.access_token,
        projectId: _var.project_id,
        deploymentEnvironments: [
            "development",
            "preview",
            "production",
        ],
        secretNameTemplate: "vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}",
    });
    
    import pulumi
    import pulumi_vault as vault
    
    vercel = vault.secrets.SyncVercelDestination("vercel",
        access_token=var["access_token"],
        project_id=var["project_id"],
        deployment_environments=[
            "development",
            "preview",
            "production",
        ],
        secret_name_template="vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}")
    
    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{
    			AccessToken: pulumi.Any(_var.Access_token),
    			ProjectId:   pulumi.Any(_var.Project_id),
    			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
    	})
    }
    
    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()
        {
            AccessToken = @var.Access_token,
            ProjectId = @var.Project_id,
            DeploymentEnvironments = new[]
            {
                "development",
                "preview",
                "production",
            },
            SecretNameTemplate = "vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}",
        });
    
    });
    
    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()        
                .accessToken(var_.access_token())
                .projectId(var_.project_id())
                .deploymentEnvironments(            
                    "development",
                    "preview",
                    "production")
                .secretNameTemplate("vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}")
                .build());
    
        }
    }
    
    resources:
      vercel:
        type: vault:secrets:SyncVercelDestination
        properties:
          accessToken: ${var.access_token}
          projectId: ${var.project_id}
          deploymentEnvironments:
            - development
            - preview
            - production
          secretNameTemplate: vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}
    

    Create SyncVercelDestination Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SyncVercelDestination(name: string, args: SyncVercelDestinationArgs, opts?: CustomResourceOptions);
    @overload
    def SyncVercelDestination(resource_name: str,
                              args: SyncVercelDestinationArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def SyncVercelDestination(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              access_token: Optional[str] = None,
                              deployment_environments: Optional[Sequence[str]] = None,
                              project_id: Optional[str] = None,
                              granularity: Optional[str] = None,
                              name: Optional[str] = None,
                              namespace: Optional[str] = None,
                              secret_name_template: Optional[str] = None,
                              team_id: Optional[str] = None)
    func NewSyncVercelDestination(ctx *Context, name string, args SyncVercelDestinationArgs, opts ...ResourceOption) (*SyncVercelDestination, error)
    public SyncVercelDestination(string name, SyncVercelDestinationArgs args, CustomResourceOptions? opts = null)
    public SyncVercelDestination(String name, SyncVercelDestinationArgs args)
    public SyncVercelDestination(String name, SyncVercelDestinationArgs args, CustomResourceOptions options)
    
    type: vault:secrets:SyncVercelDestination
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SyncVercelDestinationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SyncVercelDestinationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SyncVercelDestinationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SyncVercelDestinationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SyncVercelDestinationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var syncVercelDestinationResource = new Vault.Secrets.SyncVercelDestination("syncVercelDestinationResource", new()
    {
        AccessToken = "string",
        DeploymentEnvironments = new[]
        {
            "string",
        },
        ProjectId = "string",
        Granularity = "string",
        Name = "string",
        Namespace = "string",
        SecretNameTemplate = "string",
        TeamId = "string",
    });
    
    example, err := secrets.NewSyncVercelDestination(ctx, "syncVercelDestinationResource", &secrets.SyncVercelDestinationArgs{
    	AccessToken: pulumi.String("string"),
    	DeploymentEnvironments: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ProjectId:          pulumi.String("string"),
    	Granularity:        pulumi.String("string"),
    	Name:               pulumi.String("string"),
    	Namespace:          pulumi.String("string"),
    	SecretNameTemplate: pulumi.String("string"),
    	TeamId:             pulumi.String("string"),
    })
    
    var syncVercelDestinationResource = new SyncVercelDestination("syncVercelDestinationResource", SyncVercelDestinationArgs.builder()        
        .accessToken("string")
        .deploymentEnvironments("string")
        .projectId("string")
        .granularity("string")
        .name("string")
        .namespace("string")
        .secretNameTemplate("string")
        .teamId("string")
        .build());
    
    sync_vercel_destination_resource = vault.secrets.SyncVercelDestination("syncVercelDestinationResource",
        access_token="string",
        deployment_environments=["string"],
        project_id="string",
        granularity="string",
        name="string",
        namespace="string",
        secret_name_template="string",
        team_id="string")
    
    const syncVercelDestinationResource = new vault.secrets.SyncVercelDestination("syncVercelDestinationResource", {
        accessToken: "string",
        deploymentEnvironments: ["string"],
        projectId: "string",
        granularity: "string",
        name: "string",
        namespace: "string",
        secretNameTemplate: "string",
        teamId: "string",
    });
    
    type: vault:secrets:SyncVercelDestination
    properties:
        accessToken: string
        deploymentEnvironments:
            - string
        granularity: string
        name: string
        namespace: string
        projectId: string
        secretNameTemplate: string
        teamId: string
    

    SyncVercelDestination Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SyncVercelDestination resource accepts the following input properties:

    AccessToken string
    Vercel API access token with the permissions to manage environment variables.
    DeploymentEnvironments List<string>
    Deployment environments where the environment variables are available. Accepts development, preview and production.
    ProjectId string
    Project ID where to manage environment variables.
    Granularity string
    Determines what level of information is synced as a distinct resource at the destination. Supports secret-path and secret-key.
    Name string
    Unique name of the GitHub destination.
    Namespace string
    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.
    SecretNameTemplate string
    Template describing how to generate external secret names. Supports a subset of the Go Template syntax.
    TeamId string
    Team ID where to manage environment variables.
    AccessToken string
    Vercel API access token with the permissions to manage environment variables.
    DeploymentEnvironments []string
    Deployment environments where the environment variables are available. Accepts development, preview and production.
    ProjectId string
    Project ID where to manage environment variables.
    Granularity string
    Determines what level of information is synced as a distinct resource at the destination. Supports secret-path and secret-key.
    Name string
    Unique name of the GitHub destination.
    Namespace string
    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.
    SecretNameTemplate string
    Template describing how to generate external secret names. Supports a subset of the Go Template syntax.
    TeamId string
    Team ID where to manage environment variables.
    accessToken String
    Vercel API access token with the permissions to manage environment variables.
    deploymentEnvironments List<String>
    Deployment environments where the environment variables are available. Accepts development, preview and production.
    projectId String
    Project ID where to manage environment variables.
    granularity String
    Determines what level of information is synced as a distinct resource at the destination. Supports secret-path and secret-key.
    name String
    Unique name of the GitHub destination.
    namespace String
    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.
    secretNameTemplate String
    Template describing how to generate external secret names. Supports a subset of the Go Template syntax.
    teamId String
    Team ID where to manage environment variables.
    accessToken string
    Vercel API access token with the permissions to manage environment variables.
    deploymentEnvironments string[]
    Deployment environments where the environment variables are available. Accepts development, preview and production.
    projectId string
    Project ID where to manage environment variables.
    granularity string
    Determines what level of information is synced as a distinct resource at the destination. Supports secret-path and secret-key.
    name string
    Unique name of the GitHub destination.
    namespace string
    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.
    secretNameTemplate string
    Template describing how to generate external secret names. Supports a subset of the Go Template syntax.
    teamId string
    Team ID where to manage environment variables.
    access_token str
    Vercel API access token with the permissions to manage environment variables.
    deployment_environments Sequence[str]
    Deployment environments where the environment variables are available. Accepts development, preview and production.
    project_id str
    Project ID where to manage environment variables.
    granularity str
    Determines what level of information is synced as a distinct resource at the destination. Supports secret-path and secret-key.
    name str
    Unique name of the GitHub destination.
    namespace str
    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.
    secret_name_template str
    Template describing how to generate external secret names. Supports a subset of the Go Template syntax.
    team_id str
    Team ID where to manage environment variables.
    accessToken String
    Vercel API access token with the permissions to manage environment variables.
    deploymentEnvironments List<String>
    Deployment environments where the environment variables are available. Accepts development, preview and production.
    projectId String
    Project ID where to manage environment variables.
    granularity String
    Determines what level of information is synced as a distinct resource at the destination. Supports secret-path and secret-key.
    name String
    Unique name of the GitHub destination.
    namespace String
    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.
    secretNameTemplate String
    Template describing how to generate external secret names. Supports a subset of the Go Template syntax.
    teamId String
    Team ID where to manage environment variables.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SyncVercelDestination resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Type string
    The type of the secrets destination (vercel-project).
    Id string
    The provider-assigned unique ID for this managed resource.
    Type string
    The type of the secrets destination (vercel-project).
    id String
    The provider-assigned unique ID for this managed resource.
    type String
    The type of the secrets destination (vercel-project).
    id string
    The provider-assigned unique ID for this managed resource.
    type string
    The type of the secrets destination (vercel-project).
    id str
    The provider-assigned unique ID for this managed resource.
    type str
    The type of the secrets destination (vercel-project).
    id String
    The provider-assigned unique ID for this managed resource.
    type String
    The type of the secrets destination (vercel-project).

    Look up Existing SyncVercelDestination Resource

    Get an existing SyncVercelDestination resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SyncVercelDestinationState, opts?: CustomResourceOptions): SyncVercelDestination
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_token: Optional[str] = None,
            deployment_environments: Optional[Sequence[str]] = None,
            granularity: Optional[str] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            project_id: Optional[str] = None,
            secret_name_template: Optional[str] = None,
            team_id: Optional[str] = None,
            type: Optional[str] = None) -> SyncVercelDestination
    func GetSyncVercelDestination(ctx *Context, name string, id IDInput, state *SyncVercelDestinationState, opts ...ResourceOption) (*SyncVercelDestination, error)
    public static SyncVercelDestination Get(string name, Input<string> id, SyncVercelDestinationState? state, CustomResourceOptions? opts = null)
    public static SyncVercelDestination get(String name, Output<String> id, SyncVercelDestinationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccessToken string
    Vercel API access token with the permissions to manage environment variables.
    DeploymentEnvironments List<string>
    Deployment environments where the environment variables are available. Accepts development, preview and production.
    Granularity string
    Determines what level of information is synced as a distinct resource at the destination. Supports secret-path and secret-key.
    Name string
    Unique name of the GitHub destination.
    Namespace string
    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.
    ProjectId string
    Project ID where to manage environment variables.
    SecretNameTemplate string
    Template describing how to generate external secret names. Supports a subset of the Go Template syntax.
    TeamId string
    Team ID where to manage environment variables.
    Type string
    The type of the secrets destination (vercel-project).
    AccessToken string
    Vercel API access token with the permissions to manage environment variables.
    DeploymentEnvironments []string
    Deployment environments where the environment variables are available. Accepts development, preview and production.
    Granularity string
    Determines what level of information is synced as a distinct resource at the destination. Supports secret-path and secret-key.
    Name string
    Unique name of the GitHub destination.
    Namespace string
    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.
    ProjectId string
    Project ID where to manage environment variables.
    SecretNameTemplate string
    Template describing how to generate external secret names. Supports a subset of the Go Template syntax.
    TeamId string
    Team ID where to manage environment variables.
    Type string
    The type of the secrets destination (vercel-project).
    accessToken String
    Vercel API access token with the permissions to manage environment variables.
    deploymentEnvironments List<String>
    Deployment environments where the environment variables are available. Accepts development, preview and production.
    granularity String
    Determines what level of information is synced as a distinct resource at the destination. Supports secret-path and secret-key.
    name String
    Unique name of the GitHub destination.
    namespace String
    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.
    projectId String
    Project ID where to manage environment variables.
    secretNameTemplate String
    Template describing how to generate external secret names. Supports a subset of the Go Template syntax.
    teamId String
    Team ID where to manage environment variables.
    type String
    The type of the secrets destination (vercel-project).
    accessToken string
    Vercel API access token with the permissions to manage environment variables.
    deploymentEnvironments string[]
    Deployment environments where the environment variables are available. Accepts development, preview and production.
    granularity string
    Determines what level of information is synced as a distinct resource at the destination. Supports secret-path and secret-key.
    name string
    Unique name of the GitHub destination.
    namespace string
    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.
    projectId string
    Project ID where to manage environment variables.
    secretNameTemplate string
    Template describing how to generate external secret names. Supports a subset of the Go Template syntax.
    teamId string
    Team ID where to manage environment variables.
    type string
    The type of the secrets destination (vercel-project).
    access_token str
    Vercel API access token with the permissions to manage environment variables.
    deployment_environments Sequence[str]
    Deployment environments where the environment variables are available. Accepts development, preview and production.
    granularity str
    Determines what level of information is synced as a distinct resource at the destination. Supports secret-path and secret-key.
    name str
    Unique name of the GitHub destination.
    namespace str
    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.
    project_id str
    Project ID where to manage environment variables.
    secret_name_template str
    Template describing how to generate external secret names. Supports a subset of the Go Template syntax.
    team_id str
    Team ID where to manage environment variables.
    type str
    The type of the secrets destination (vercel-project).
    accessToken String
    Vercel API access token with the permissions to manage environment variables.
    deploymentEnvironments List<String>
    Deployment environments where the environment variables are available. Accepts development, preview and production.
    granularity String
    Determines what level of information is synced as a distinct resource at the destination. Supports secret-path and secret-key.
    name String
    Unique name of the GitHub destination.
    namespace String
    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.
    projectId String
    Project ID where to manage environment variables.
    secretNameTemplate String
    Template describing how to generate external secret names. Supports a subset of the Go Template syntax.
    teamId String
    Team ID where to manage environment variables.
    type String
    The type of the secrets destination (vercel-project).

    Import

    GitHub Secrets sync destinations can be imported using the name, e.g.

    $ pulumi import vault:secrets/syncVercelDestination:SyncVercelDestination vercel vercel-dest
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Vault pulumi/pulumi-vault
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vault Terraform Provider.
    vault logo
    HashiCorp Vault v6.1.0 published on Thursday, Apr 4, 2024 by Pulumi