published on Wednesday, Jul 22, 2026 by Pulumiverse
published on Wednesday, Jul 22, 2026 by Pulumiverse
Provides a Shared Environment Variable resource.
A Shared Environment Variable resource defines an Environment Variable that can be shared between multiple Vercel Projects.
For more detailed information, please see the Vercel documentation.
Note: Starting in provider version
4.8.0, Shared Environment Variables require an explicitsensitivevalue. Variables targeting onlydevelopmentmust setsensitive = false. If your team enforces sensitive environment variables, variables targetingpreview,production, or custom environments must setsensitive = true. When that team policy is enabled, a variable cannot targetdevelopmenttogether withpreview,production, or custom environments.
Note: Write-Only argument
value_wois available to use in place ofvalue. Write-Only arguments are supported in HashiCorp Terraform 1.11.0 and later. Learn more.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vercel from "@pulumiverse/vercel";
const example = new vercel.Project("example", {
name: "example",
gitRepository: {
type: "github",
repo: "vercel/some-repo",
},
});
// Shared environment variables must explicitly set `sensitive`.
const exampleSharedEnvironmentVariable = new vercel.SharedEnvironmentVariable("example", {
key: "EXAMPLE",
value: "some_value",
targets: ["production"],
sensitive: true,
comment: "an example shared variable",
projectIds: [example.id],
});
// Shared environment variables targeting `development` must explicitly set `sensitive = false`.
const exampleDevelopment = new vercel.SharedEnvironmentVariable("example_development", {
key: "EXAMPLE_DEVELOPMENT",
value: "some_development_value",
targets: ["development"],
sensitive: false,
comment: "available during local development",
projectIds: [example.id],
});
import pulumi
import pulumiverse_vercel as vercel
example = vercel.Project("example",
name="example",
git_repository={
"type": "github",
"repo": "vercel/some-repo",
})
# Shared environment variables must explicitly set `sensitive`.
example_shared_environment_variable = vercel.SharedEnvironmentVariable("example",
key="EXAMPLE",
value="some_value",
targets=["production"],
sensitive=True,
comment="an example shared variable",
project_ids=[example.id])
# Shared environment variables targeting `development` must explicitly set `sensitive = false`.
example_development = vercel.SharedEnvironmentVariable("example_development",
key="EXAMPLE_DEVELOPMENT",
value="some_development_value",
targets=["development"],
sensitive=False,
comment="available during local development",
project_ids=[example.id])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-vercel/sdk/v5/go/vercel"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := vercel.NewProject(ctx, "example", &vercel.ProjectArgs{
Name: pulumi.String("example"),
GitRepository: &vercel.ProjectGitRepositoryArgs{
Type: pulumi.String("github"),
Repo: pulumi.String("vercel/some-repo"),
},
})
if err != nil {
return err
}
// Shared environment variables must explicitly set `sensitive`.
_, err = vercel.NewSharedEnvironmentVariable(ctx, "example", &vercel.SharedEnvironmentVariableArgs{
Key: pulumi.String("EXAMPLE"),
Value: pulumi.String("some_value"),
Targets: pulumi.StringArray{
pulumi.String("production"),
},
Sensitive: pulumi.Bool(true),
Comment: pulumi.String("an example shared variable"),
ProjectIds: pulumi.StringArray{
example.ID(),
},
})
if err != nil {
return err
}
// Shared environment variables targeting `development` must explicitly set `sensitive = false`.
_, err = vercel.NewSharedEnvironmentVariable(ctx, "example_development", &vercel.SharedEnvironmentVariableArgs{
Key: pulumi.String("EXAMPLE_DEVELOPMENT"),
Value: pulumi.String("some_development_value"),
Targets: pulumi.StringArray{
pulumi.String("development"),
},
Sensitive: pulumi.Bool(false),
Comment: pulumi.String("available during local development"),
ProjectIds: pulumi.StringArray{
example.ID(),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vercel = Pulumiverse.Vercel;
return await Deployment.RunAsync(() =>
{
var example = new Vercel.Project("example", new()
{
Name = "example",
GitRepository = new Vercel.Inputs.ProjectGitRepositoryArgs
{
Type = "github",
Repo = "vercel/some-repo",
},
});
// Shared environment variables must explicitly set `sensitive`.
var exampleSharedEnvironmentVariable = new Vercel.SharedEnvironmentVariable("example", new()
{
Key = "EXAMPLE",
Value = "some_value",
Targets = new[]
{
"production",
},
Sensitive = true,
Comment = "an example shared variable",
ProjectIds = new[]
{
example.Id,
},
});
// Shared environment variables targeting `development` must explicitly set `sensitive = false`.
var exampleDevelopment = new Vercel.SharedEnvironmentVariable("example_development", new()
{
Key = "EXAMPLE_DEVELOPMENT",
Value = "some_development_value",
Targets = new[]
{
"development",
},
Sensitive = false,
Comment = "available during local development",
ProjectIds = new[]
{
example.Id,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumiverse.vercel.Project;
import com.pulumiverse.vercel.ProjectArgs;
import com.pulumi.vercel.inputs.ProjectGitRepositoryArgs;
import com.pulumiverse.vercel.SharedEnvironmentVariable;
import com.pulumiverse.vercel.SharedEnvironmentVariableArgs;
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 example = new Project("example", ProjectArgs.builder()
.name("example")
.gitRepository(ProjectGitRepositoryArgs.builder()
.type("github")
.repo("vercel/some-repo")
.build())
.build());
// Shared environment variables must explicitly set `sensitive`.
var exampleSharedEnvironmentVariable = new SharedEnvironmentVariable("exampleSharedEnvironmentVariable", SharedEnvironmentVariableArgs.builder()
.key("EXAMPLE")
.value("some_value")
.targets("production")
.sensitive(true)
.comment("an example shared variable")
.projectIds(example.id())
.build());
// Shared environment variables targeting `development` must explicitly set `sensitive = false`.
var exampleDevelopment = new SharedEnvironmentVariable("exampleDevelopment", SharedEnvironmentVariableArgs.builder()
.key("EXAMPLE_DEVELOPMENT")
.value("some_development_value")
.targets("development")
.sensitive(false)
.comment("available during local development")
.projectIds(example.id())
.build());
}
}
resources:
example:
type: vercel:Project
properties:
name: example
gitRepository:
type: github
repo: vercel/some-repo
# Shared environment variables must explicitly set `sensitive`.
exampleSharedEnvironmentVariable:
type: vercel:SharedEnvironmentVariable
name: example
properties:
key: EXAMPLE
value: some_value
targets:
- production
sensitive: true
comment: an example shared variable
projectIds:
- ${example.id}
# Shared environment variables targeting `development` must explicitly set `sensitive = false`.
exampleDevelopment:
type: vercel:SharedEnvironmentVariable
name: example_development
properties:
key: EXAMPLE_DEVELOPMENT
value: some_development_value
targets:
- development
sensitive: false
comment: available during local development
projectIds:
- ${example.id}
Example coming soon!
Create SharedEnvironmentVariable Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SharedEnvironmentVariable(name: string, args: SharedEnvironmentVariableArgs, opts?: CustomResourceOptions);@overload
def SharedEnvironmentVariable(resource_name: str,
args: SharedEnvironmentVariableArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SharedEnvironmentVariable(resource_name: str,
opts: Optional[ResourceOptions] = None,
key: Optional[str] = None,
project_ids: Optional[Sequence[str]] = None,
sensitive: Optional[bool] = None,
apply_to_all_custom_environments: Optional[bool] = None,
comment: Optional[str] = None,
targets: Optional[Sequence[str]] = None,
team_id: Optional[str] = None,
value: Optional[str] = None,
value_wo: Optional[str] = None)func NewSharedEnvironmentVariable(ctx *Context, name string, args SharedEnvironmentVariableArgs, opts ...ResourceOption) (*SharedEnvironmentVariable, error)public SharedEnvironmentVariable(string name, SharedEnvironmentVariableArgs args, CustomResourceOptions? opts = null)
public SharedEnvironmentVariable(String name, SharedEnvironmentVariableArgs args)
public SharedEnvironmentVariable(String name, SharedEnvironmentVariableArgs args, CustomResourceOptions options)
type: vercel:SharedEnvironmentVariable
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "vercel_shared_environment_variable" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SharedEnvironmentVariableArgs
- 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 SharedEnvironmentVariableArgs
- 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 SharedEnvironmentVariableArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SharedEnvironmentVariableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SharedEnvironmentVariableArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var sharedEnvironmentVariableResource = new Vercel.SharedEnvironmentVariable("sharedEnvironmentVariableResource", new()
{
Key = "string",
ProjectIds = new[]
{
"string",
},
Sensitive = false,
ApplyToAllCustomEnvironments = false,
Comment = "string",
Targets = new[]
{
"string",
},
TeamId = "string",
Value = "string",
ValueWo = "string",
});
example, err := vercel.NewSharedEnvironmentVariable(ctx, "sharedEnvironmentVariableResource", &vercel.SharedEnvironmentVariableArgs{
Key: pulumi.String("string"),
ProjectIds: pulumi.StringArray{
pulumi.String("string"),
},
Sensitive: pulumi.Bool(false),
ApplyToAllCustomEnvironments: pulumi.Bool(false),
Comment: pulumi.String("string"),
Targets: pulumi.StringArray{
pulumi.String("string"),
},
TeamId: pulumi.String("string"),
Value: pulumi.String("string"),
ValueWo: pulumi.String("string"),
})
resource "vercel_shared_environment_variable" "sharedEnvironmentVariableResource" {
lifecycle {
create_before_destroy = true
}
key = "string"
project_ids = ["string"]
sensitive = false
apply_to_all_custom_environments = false
comment = "string"
targets = ["string"]
team_id = "string"
value = "string"
value_wo = "string"
}
var sharedEnvironmentVariableResource = new SharedEnvironmentVariable("sharedEnvironmentVariableResource", SharedEnvironmentVariableArgs.builder()
.key("string")
.projectIds("string")
.sensitive(false)
.applyToAllCustomEnvironments(false)
.comment("string")
.targets("string")
.teamId("string")
.value("string")
.valueWo("string")
.build());
shared_environment_variable_resource = vercel.SharedEnvironmentVariable("sharedEnvironmentVariableResource",
key="string",
project_ids=["string"],
sensitive=False,
apply_to_all_custom_environments=False,
comment="string",
targets=["string"],
team_id="string",
value="string",
value_wo="string")
const sharedEnvironmentVariableResource = new vercel.SharedEnvironmentVariable("sharedEnvironmentVariableResource", {
key: "string",
projectIds: ["string"],
sensitive: false,
applyToAllCustomEnvironments: false,
comment: "string",
targets: ["string"],
teamId: "string",
value: "string",
valueWo: "string",
});
type: vercel:SharedEnvironmentVariable
properties:
applyToAllCustomEnvironments: false
comment: string
key: string
projectIds:
- string
sensitive: false
targets:
- string
teamId: string
value: string
valueWo: string
SharedEnvironmentVariable Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SharedEnvironmentVariable resource accepts the following input properties:
- Key string
- The name of the Environment Variable.
- Project
Ids List<string> - The ID of the Vercel project.
- Sensitive bool
- Whether the Environment Variable is sensitive (meaning it cannot be read via the API or Vercel Dashboard once set). This must be explicitly set. If a team-wide environment variable policy is active, environment variables may have to be sensitive. Variables targeting only
developmentmust set this tofalse. Variables targetingpreview,production, or custom environments may have to set this totrue. A variable cannot targetdevelopmenttogether withpreview,production, or custom environments while that team policy is enabled. - Apply
To boolAll Custom Environments - Whether the shared environment variable should be applied to all custom environments in the linked projects.
- Comment string
- A comment explaining what the environment variable is for.
- Targets List<string>
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. - Team
Id string - The ID of the Vercel team. Shared environment variables require a team.
- Value string
- (Optional, exactly one of
valueorvalue_wois required) The value of the Environment Variable. - Value
Wo string - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
(Optional, Write-Only, exactly one of
valueorvalue_wois required) The value of the Environment Variable, from anephemeralresource.
- Key string
- The name of the Environment Variable.
- Project
Ids []string - The ID of the Vercel project.
- Sensitive bool
- Whether the Environment Variable is sensitive (meaning it cannot be read via the API or Vercel Dashboard once set). This must be explicitly set. If a team-wide environment variable policy is active, environment variables may have to be sensitive. Variables targeting only
developmentmust set this tofalse. Variables targetingpreview,production, or custom environments may have to set this totrue. A variable cannot targetdevelopmenttogether withpreview,production, or custom environments while that team policy is enabled. - Apply
To boolAll Custom Environments - Whether the shared environment variable should be applied to all custom environments in the linked projects.
- Comment string
- A comment explaining what the environment variable is for.
- Targets []string
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. - Team
Id string - The ID of the Vercel team. Shared environment variables require a team.
- Value string
- (Optional, exactly one of
valueorvalue_wois required) The value of the Environment Variable. - Value
Wo string - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
(Optional, Write-Only, exactly one of
valueorvalue_wois required) The value of the Environment Variable, from anephemeralresource.
- key string
- The name of the Environment Variable.
- project_
ids list(string) - The ID of the Vercel project.
- sensitive bool
- Whether the Environment Variable is sensitive (meaning it cannot be read via the API or Vercel Dashboard once set). This must be explicitly set. If a team-wide environment variable policy is active, environment variables may have to be sensitive. Variables targeting only
developmentmust set this tofalse. Variables targetingpreview,production, or custom environments may have to set this totrue. A variable cannot targetdevelopmenttogether withpreview,production, or custom environments while that team policy is enabled. - apply_
to_ boolall_ custom_ environments - Whether the shared environment variable should be applied to all custom environments in the linked projects.
- comment string
- A comment explaining what the environment variable is for.
- targets list(string)
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. - team_
id string - The ID of the Vercel team. Shared environment variables require a team.
- value string
- (Optional, exactly one of
valueorvalue_wois required) The value of the Environment Variable. - value_
wo string - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
(Optional, Write-Only, exactly one of
valueorvalue_wois required) The value of the Environment Variable, from anephemeralresource.
- key String
- The name of the Environment Variable.
- project
Ids List<String> - The ID of the Vercel project.
- sensitive Boolean
- Whether the Environment Variable is sensitive (meaning it cannot be read via the API or Vercel Dashboard once set). This must be explicitly set. If a team-wide environment variable policy is active, environment variables may have to be sensitive. Variables targeting only
developmentmust set this tofalse. Variables targetingpreview,production, or custom environments may have to set this totrue. A variable cannot targetdevelopmenttogether withpreview,production, or custom environments while that team policy is enabled. - apply
To BooleanAll Custom Environments - Whether the shared environment variable should be applied to all custom environments in the linked projects.
- comment String
- A comment explaining what the environment variable is for.
- targets List<String>
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. - team
Id String - The ID of the Vercel team. Shared environment variables require a team.
- value String
- (Optional, exactly one of
valueorvalue_wois required) The value of the Environment Variable. - value
Wo String - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
(Optional, Write-Only, exactly one of
valueorvalue_wois required) The value of the Environment Variable, from anephemeralresource.
- key string
- The name of the Environment Variable.
- project
Ids string[] - The ID of the Vercel project.
- sensitive boolean
- Whether the Environment Variable is sensitive (meaning it cannot be read via the API or Vercel Dashboard once set). This must be explicitly set. If a team-wide environment variable policy is active, environment variables may have to be sensitive. Variables targeting only
developmentmust set this tofalse. Variables targetingpreview,production, or custom environments may have to set this totrue. A variable cannot targetdevelopmenttogether withpreview,production, or custom environments while that team policy is enabled. - apply
To booleanAll Custom Environments - Whether the shared environment variable should be applied to all custom environments in the linked projects.
- comment string
- A comment explaining what the environment variable is for.
- targets string[]
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. - team
Id string - The ID of the Vercel team. Shared environment variables require a team.
- value string
- (Optional, exactly one of
valueorvalue_wois required) The value of the Environment Variable. - value
Wo string - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
(Optional, Write-Only, exactly one of
valueorvalue_wois required) The value of the Environment Variable, from anephemeralresource.
- key str
- The name of the Environment Variable.
- project_
ids Sequence[str] - The ID of the Vercel project.
- sensitive bool
- Whether the Environment Variable is sensitive (meaning it cannot be read via the API or Vercel Dashboard once set). This must be explicitly set. If a team-wide environment variable policy is active, environment variables may have to be sensitive. Variables targeting only
developmentmust set this tofalse. Variables targetingpreview,production, or custom environments may have to set this totrue. A variable cannot targetdevelopmenttogether withpreview,production, or custom environments while that team policy is enabled. - apply_
to_ boolall_ custom_ environments - Whether the shared environment variable should be applied to all custom environments in the linked projects.
- comment str
- A comment explaining what the environment variable is for.
- targets Sequence[str]
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. - team_
id str - The ID of the Vercel team. Shared environment variables require a team.
- value str
- (Optional, exactly one of
valueorvalue_wois required) The value of the Environment Variable. - value_
wo str - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
(Optional, Write-Only, exactly one of
valueorvalue_wois required) The value of the Environment Variable, from anephemeralresource.
- key String
- The name of the Environment Variable.
- project
Ids List<String> - The ID of the Vercel project.
- sensitive Boolean
- Whether the Environment Variable is sensitive (meaning it cannot be read via the API or Vercel Dashboard once set). This must be explicitly set. If a team-wide environment variable policy is active, environment variables may have to be sensitive. Variables targeting only
developmentmust set this tofalse. Variables targetingpreview,production, or custom environments may have to set this totrue. A variable cannot targetdevelopmenttogether withpreview,production, or custom environments while that team policy is enabled. - apply
To BooleanAll Custom Environments - Whether the shared environment variable should be applied to all custom environments in the linked projects.
- comment String
- A comment explaining what the environment variable is for.
- targets List<String>
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. - team
Id String - The ID of the Vercel team. Shared environment variables require a team.
- value String
- (Optional, exactly one of
valueorvalue_wois required) The value of the Environment Variable. - value
Wo String - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
(Optional, Write-Only, exactly one of
valueorvalue_wois required) The value of the Environment Variable, from anephemeralresource.
Outputs
All input properties are implicitly available as output properties. Additionally, the SharedEnvironmentVariable resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SharedEnvironmentVariable Resource
Get an existing SharedEnvironmentVariable 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?: SharedEnvironmentVariableState, opts?: CustomResourceOptions): SharedEnvironmentVariable@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
apply_to_all_custom_environments: Optional[bool] = None,
comment: Optional[str] = None,
key: Optional[str] = None,
project_ids: Optional[Sequence[str]] = None,
sensitive: Optional[bool] = None,
targets: Optional[Sequence[str]] = None,
team_id: Optional[str] = None,
value: Optional[str] = None,
value_wo: Optional[str] = None) -> SharedEnvironmentVariablefunc GetSharedEnvironmentVariable(ctx *Context, name string, id IDInput, state *SharedEnvironmentVariableState, opts ...ResourceOption) (*SharedEnvironmentVariable, error)public static SharedEnvironmentVariable Get(string name, Input<string> id, SharedEnvironmentVariableState? state, CustomResourceOptions? opts = null)public static SharedEnvironmentVariable get(String name, Output<String> id, SharedEnvironmentVariableState state, CustomResourceOptions options)resources: _: type: vercel:SharedEnvironmentVariable get: id: ${id}import {
to = vercel_shared_environment_variable.example
id = "${id}"
}
- 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.
- Apply
To boolAll Custom Environments - Whether the shared environment variable should be applied to all custom environments in the linked projects.
- Comment string
- A comment explaining what the environment variable is for.
- Key string
- The name of the Environment Variable.
- Project
Ids List<string> - The ID of the Vercel project.
- Sensitive bool
- Whether the Environment Variable is sensitive (meaning it cannot be read via the API or Vercel Dashboard once set). This must be explicitly set. If a team-wide environment variable policy is active, environment variables may have to be sensitive. Variables targeting only
developmentmust set this tofalse. Variables targetingpreview,production, or custom environments may have to set this totrue. A variable cannot targetdevelopmenttogether withpreview,production, or custom environments while that team policy is enabled. - Targets List<string>
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. - Team
Id string - The ID of the Vercel team. Shared environment variables require a team.
- Value string
- (Optional, exactly one of
valueorvalue_wois required) The value of the Environment Variable. - Value
Wo string - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
(Optional, Write-Only, exactly one of
valueorvalue_wois required) The value of the Environment Variable, from anephemeralresource.
- Apply
To boolAll Custom Environments - Whether the shared environment variable should be applied to all custom environments in the linked projects.
- Comment string
- A comment explaining what the environment variable is for.
- Key string
- The name of the Environment Variable.
- Project
Ids []string - The ID of the Vercel project.
- Sensitive bool
- Whether the Environment Variable is sensitive (meaning it cannot be read via the API or Vercel Dashboard once set). This must be explicitly set. If a team-wide environment variable policy is active, environment variables may have to be sensitive. Variables targeting only
developmentmust set this tofalse. Variables targetingpreview,production, or custom environments may have to set this totrue. A variable cannot targetdevelopmenttogether withpreview,production, or custom environments while that team policy is enabled. - Targets []string
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. - Team
Id string - The ID of the Vercel team. Shared environment variables require a team.
- Value string
- (Optional, exactly one of
valueorvalue_wois required) The value of the Environment Variable. - Value
Wo string - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
(Optional, Write-Only, exactly one of
valueorvalue_wois required) The value of the Environment Variable, from anephemeralresource.
- apply_
to_ boolall_ custom_ environments - Whether the shared environment variable should be applied to all custom environments in the linked projects.
- comment string
- A comment explaining what the environment variable is for.
- key string
- The name of the Environment Variable.
- project_
ids list(string) - The ID of the Vercel project.
- sensitive bool
- Whether the Environment Variable is sensitive (meaning it cannot be read via the API or Vercel Dashboard once set). This must be explicitly set. If a team-wide environment variable policy is active, environment variables may have to be sensitive. Variables targeting only
developmentmust set this tofalse. Variables targetingpreview,production, or custom environments may have to set this totrue. A variable cannot targetdevelopmenttogether withpreview,production, or custom environments while that team policy is enabled. - targets list(string)
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. - team_
id string - The ID of the Vercel team. Shared environment variables require a team.
- value string
- (Optional, exactly one of
valueorvalue_wois required) The value of the Environment Variable. - value_
wo string - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
(Optional, Write-Only, exactly one of
valueorvalue_wois required) The value of the Environment Variable, from anephemeralresource.
- apply
To BooleanAll Custom Environments - Whether the shared environment variable should be applied to all custom environments in the linked projects.
- comment String
- A comment explaining what the environment variable is for.
- key String
- The name of the Environment Variable.
- project
Ids List<String> - The ID of the Vercel project.
- sensitive Boolean
- Whether the Environment Variable is sensitive (meaning it cannot be read via the API or Vercel Dashboard once set). This must be explicitly set. If a team-wide environment variable policy is active, environment variables may have to be sensitive. Variables targeting only
developmentmust set this tofalse. Variables targetingpreview,production, or custom environments may have to set this totrue. A variable cannot targetdevelopmenttogether withpreview,production, or custom environments while that team policy is enabled. - targets List<String>
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. - team
Id String - The ID of the Vercel team. Shared environment variables require a team.
- value String
- (Optional, exactly one of
valueorvalue_wois required) The value of the Environment Variable. - value
Wo String - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
(Optional, Write-Only, exactly one of
valueorvalue_wois required) The value of the Environment Variable, from anephemeralresource.
- apply
To booleanAll Custom Environments - Whether the shared environment variable should be applied to all custom environments in the linked projects.
- comment string
- A comment explaining what the environment variable is for.
- key string
- The name of the Environment Variable.
- project
Ids string[] - The ID of the Vercel project.
- sensitive boolean
- Whether the Environment Variable is sensitive (meaning it cannot be read via the API or Vercel Dashboard once set). This must be explicitly set. If a team-wide environment variable policy is active, environment variables may have to be sensitive. Variables targeting only
developmentmust set this tofalse. Variables targetingpreview,production, or custom environments may have to set this totrue. A variable cannot targetdevelopmenttogether withpreview,production, or custom environments while that team policy is enabled. - targets string[]
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. - team
Id string - The ID of the Vercel team. Shared environment variables require a team.
- value string
- (Optional, exactly one of
valueorvalue_wois required) The value of the Environment Variable. - value
Wo string - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
(Optional, Write-Only, exactly one of
valueorvalue_wois required) The value of the Environment Variable, from anephemeralresource.
- apply_
to_ boolall_ custom_ environments - Whether the shared environment variable should be applied to all custom environments in the linked projects.
- comment str
- A comment explaining what the environment variable is for.
- key str
- The name of the Environment Variable.
- project_
ids Sequence[str] - The ID of the Vercel project.
- sensitive bool
- Whether the Environment Variable is sensitive (meaning it cannot be read via the API or Vercel Dashboard once set). This must be explicitly set. If a team-wide environment variable policy is active, environment variables may have to be sensitive. Variables targeting only
developmentmust set this tofalse. Variables targetingpreview,production, or custom environments may have to set this totrue. A variable cannot targetdevelopmenttogether withpreview,production, or custom environments while that team policy is enabled. - targets Sequence[str]
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. - team_
id str - The ID of the Vercel team. Shared environment variables require a team.
- value str
- (Optional, exactly one of
valueorvalue_wois required) The value of the Environment Variable. - value_
wo str - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
(Optional, Write-Only, exactly one of
valueorvalue_wois required) The value of the Environment Variable, from anephemeralresource.
- apply
To BooleanAll Custom Environments - Whether the shared environment variable should be applied to all custom environments in the linked projects.
- comment String
- A comment explaining what the environment variable is for.
- key String
- The name of the Environment Variable.
- project
Ids List<String> - The ID of the Vercel project.
- sensitive Boolean
- Whether the Environment Variable is sensitive (meaning it cannot be read via the API or Vercel Dashboard once set). This must be explicitly set. If a team-wide environment variable policy is active, environment variables may have to be sensitive. Variables targeting only
developmentmust set this tofalse. Variables targetingpreview,production, or custom environments may have to set this totrue. A variable cannot targetdevelopmenttogether withpreview,production, or custom environments while that team policy is enabled. - targets List<String>
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. - team
Id String - The ID of the Vercel team. Shared environment variables require a team.
- value String
- (Optional, exactly one of
valueorvalue_wois required) The value of the Environment Variable. - value
Wo String - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
(Optional, Write-Only, exactly one of
valueorvalue_wois required) The value of the Environment Variable, from anephemeralresource.
Import
The pulumi import command can be used, for example:
You can import via the team_id and environment variable id.
- team_id can be found in the team
settingstab in the Vercel UI. - environment variable id can be taken from the network tab inside developer tools, while you are on the project page.
Note also, that the value field for sensitive environment variables will be imported as null.
$ pulumi import vercel:index/sharedEnvironmentVariable:SharedEnvironmentVariable example team_xxxxxxxxxxxxxxxxxxxxxxxx/env_yyyyyyyyyyyyy
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- vercel pulumiverse/pulumi-vercel
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vercelTerraform Provider.
published on Wednesday, Jul 22, 2026 by Pulumiverse