published on Thursday, Oct 15, 2026 by Pulumiverse
published on Thursday, Oct 15, 2026 by Pulumiverse
Provides a Project Environment Variable resource.
A Project Environment Variable resource defines an Environment Variable on a Vercel Project.
For more detailed information, please see the Vercel documentation.
Terraform currently provides this Project Environment Variable resource (a single Environment Variable), a Project Environment Variables resource (multiple Environment Variables), and a Project resource with Environment Variables defined in-line via the
environmentfield. At this time you cannot use a Vercel Project resource with in-lineenvironmentin conjunction with anyvercel.ProjectEnvironmentVariablesorvercel.ProjectEnvironmentVariableresources. Doing so will cause a conflict of settings and will overwrite Environment Variables.
Note: Starting in provider version
4.8.0, environment variables require an explicitsensitivevalue. Secrets (sensitive = true) are supported in all target environments, including Development. Team environment variable policies are enforced by the Vercel API at apply time.
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.
Create ProjectEnvironmentVariable Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectEnvironmentVariable(name: string, args: ProjectEnvironmentVariableArgs, opts?: CustomResourceOptions);@overload
def ProjectEnvironmentVariable(resource_name: str,
args: ProjectEnvironmentVariableArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectEnvironmentVariable(resource_name: str,
opts: Optional[ResourceOptions] = None,
key: Optional[str] = None,
project_id: Optional[str] = None,
sensitive: Optional[bool] = None,
comment: Optional[str] = None,
custom_environment_ids: Optional[Sequence[str]] = None,
git_branch: Optional[str] = None,
targets: Optional[Sequence[str]] = None,
team_id: Optional[str] = None,
value: Optional[str] = None,
value_wo: Optional[str] = None,
value_wo_version: Optional[int] = None,
visibility: Optional[str] = None)func NewProjectEnvironmentVariable(ctx *Context, name string, args ProjectEnvironmentVariableArgs, opts ...ResourceOption) (*ProjectEnvironmentVariable, error)public ProjectEnvironmentVariable(string name, ProjectEnvironmentVariableArgs args, CustomResourceOptions? opts = null)
public ProjectEnvironmentVariable(String name, ProjectEnvironmentVariableArgs args)
public ProjectEnvironmentVariable(String name, ProjectEnvironmentVariableArgs args, CustomResourceOptions options)
type: vercel:ProjectEnvironmentVariable
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "vercel_project_environment_variable" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ProjectEnvironmentVariableArgs
- 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 ProjectEnvironmentVariableArgs
- 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 ProjectEnvironmentVariableArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectEnvironmentVariableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectEnvironmentVariableArgs
- 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 projectEnvironmentVariableResource = new Vercel.ProjectEnvironmentVariable("projectEnvironmentVariableResource", new()
{
Key = "string",
ProjectId = "string",
Sensitive = false,
Comment = "string",
CustomEnvironmentIds = new[]
{
"string",
},
GitBranch = "string",
Targets = new[]
{
"string",
},
TeamId = "string",
Value = "string",
ValueWo = "string",
ValueWoVersion = 0,
Visibility = "string",
});
example, err := vercel.NewProjectEnvironmentVariable(ctx, "projectEnvironmentVariableResource", &vercel.ProjectEnvironmentVariableArgs{
Key: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Sensitive: pulumi.Bool(false),
Comment: pulumi.String("string"),
CustomEnvironmentIds: pulumi.StringArray{
pulumi.String("string"),
},
GitBranch: pulumi.String("string"),
Targets: pulumi.StringArray{
pulumi.String("string"),
},
TeamId: pulumi.String("string"),
Value: pulumi.String("string"),
ValueWo: pulumi.String("string"),
ValueWoVersion: pulumi.Int(0),
Visibility: pulumi.String("string"),
})
resource "vercel_project_environment_variable" "projectEnvironmentVariableResource" {
lifecycle {
create_before_destroy = true
}
key = "string"
project_id = "string"
sensitive = false
comment = "string"
custom_environment_ids = ["string"]
git_branch = "string"
targets = ["string"]
team_id = "string"
value = "string"
value_wo = "string"
value_wo_version = 0
visibility = "string"
}
var projectEnvironmentVariableResource = new ProjectEnvironmentVariable("projectEnvironmentVariableResource", ProjectEnvironmentVariableArgs.builder()
.key("string")
.projectId("string")
.sensitive(false)
.comment("string")
.customEnvironmentIds("string")
.gitBranch("string")
.targets("string")
.teamId("string")
.value("string")
.valueWo("string")
.valueWoVersion(0)
.visibility("string")
.build());
project_environment_variable_resource = vercel.ProjectEnvironmentVariable("projectEnvironmentVariableResource",
key="string",
project_id="string",
sensitive=False,
comment="string",
custom_environment_ids=["string"],
git_branch="string",
targets=["string"],
team_id="string",
value="string",
value_wo="string",
value_wo_version=0,
visibility="string")
const projectEnvironmentVariableResource = new vercel.ProjectEnvironmentVariable("projectEnvironmentVariableResource", {
key: "string",
projectId: "string",
sensitive: false,
comment: "string",
customEnvironmentIds: ["string"],
gitBranch: "string",
targets: ["string"],
teamId: "string",
value: "string",
valueWo: "string",
valueWoVersion: 0,
visibility: "string",
});
type: vercel:ProjectEnvironmentVariable
properties:
comment: string
customEnvironmentIds:
- string
gitBranch: string
key: string
projectId: string
sensitive: false
targets:
- string
teamId: string
value: string
valueWo: string
valueWoVersion: 0
visibility: string
ProjectEnvironmentVariable 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 ProjectEnvironmentVariable resource accepts the following input properties:
- Key string
- The name of the Environment Variable.
- Project
Id 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. Secrets are supported in all target environments, including Development.
- Comment string
- A comment explaining what the environment variable is for.
- Custom
Environment List<string>Ids - The IDs of Custom Environments that the Environment Variable should be present on. At least one of
targetorcustom_environment_idsmust be set. - Git
Branch string - The git branch of the Environment Variable.
- Targets List<string>
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. At least one oftargetorcustom_environment_idsmust be set. - Team
Id string - The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
- 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. - Value
Wo intVersion - An integer used to trigger an update to
value_wo. Increment this value when an update to the write-only value is required. - Visibility string
- Controls how the environment variable is categorized:
config(configuration values) orsecret(secret values). When omitted, visibility is inferred fromsensitivefor backwards compatibility and is not sent to the API.
- Key string
- The name of the Environment Variable.
- Project
Id 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. Secrets are supported in all target environments, including Development.
- Comment string
- A comment explaining what the environment variable is for.
- Custom
Environment []stringIds - The IDs of Custom Environments that the Environment Variable should be present on. At least one of
targetorcustom_environment_idsmust be set. - Git
Branch string - The git branch of the Environment Variable.
- Targets []string
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. At least one oftargetorcustom_environment_idsmust be set. - Team
Id string - The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
- 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. - Value
Wo intVersion - An integer used to trigger an update to
value_wo. Increment this value when an update to the write-only value is required. - Visibility string
- Controls how the environment variable is categorized:
config(configuration values) orsecret(secret values). When omitted, visibility is inferred fromsensitivefor backwards compatibility and is not sent to the API.
- key string
- The name of the Environment Variable.
- project_
id 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. Secrets are supported in all target environments, including Development.
- comment string
- A comment explaining what the environment variable is for.
- custom_
environment_ list(string)ids - The IDs of Custom Environments that the Environment Variable should be present on. At least one of
targetorcustom_environment_idsmust be set. - git_
branch string - The git branch of the Environment Variable.
- targets list(string)
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. At least one oftargetorcustom_environment_idsmust be set. - team_
id string - The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
- 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. - value_
wo_ numberversion - An integer used to trigger an update to
value_wo. Increment this value when an update to the write-only value is required. - visibility string
- Controls how the environment variable is categorized:
config(configuration values) orsecret(secret values). When omitted, visibility is inferred fromsensitivefor backwards compatibility and is not sent to the API.
- key String
- The name of the Environment Variable.
- project
Id 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. Secrets are supported in all target environments, including Development.
- comment String
- A comment explaining what the environment variable is for.
- custom
Environment List<String>Ids - The IDs of Custom Environments that the Environment Variable should be present on. At least one of
targetorcustom_environment_idsmust be set. - git
Branch String - The git branch of the Environment Variable.
- targets List<String>
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. At least one oftargetorcustom_environment_idsmust be set. - team
Id String - The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
- 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. - value
Wo IntegerVersion - An integer used to trigger an update to
value_wo. Increment this value when an update to the write-only value is required. - visibility String
- Controls how the environment variable is categorized:
config(configuration values) orsecret(secret values). When omitted, visibility is inferred fromsensitivefor backwards compatibility and is not sent to the API.
- key string
- The name of the Environment Variable.
- project
Id 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. Secrets are supported in all target environments, including Development.
- comment string
- A comment explaining what the environment variable is for.
- custom
Environment string[]Ids - The IDs of Custom Environments that the Environment Variable should be present on. At least one of
targetorcustom_environment_idsmust be set. - git
Branch string - The git branch of the Environment Variable.
- targets string[]
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. At least one oftargetorcustom_environment_idsmust be set. - team
Id string - The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
- 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. - value
Wo numberVersion - An integer used to trigger an update to
value_wo. Increment this value when an update to the write-only value is required. - visibility string
- Controls how the environment variable is categorized:
config(configuration values) orsecret(secret values). When omitted, visibility is inferred fromsensitivefor backwards compatibility and is not sent to the API.
- key str
- The name of the Environment Variable.
- project_
id 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. Secrets are supported in all target environments, including Development.
- comment str
- A comment explaining what the environment variable is for.
- custom_
environment_ Sequence[str]ids - The IDs of Custom Environments that the Environment Variable should be present on. At least one of
targetorcustom_environment_idsmust be set. - git_
branch str - The git branch of the Environment Variable.
- targets Sequence[str]
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. At least one oftargetorcustom_environment_idsmust be set. - team_
id str - The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
- 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. - value_
wo_ intversion - An integer used to trigger an update to
value_wo. Increment this value when an update to the write-only value is required. - visibility str
- Controls how the environment variable is categorized:
config(configuration values) orsecret(secret values). When omitted, visibility is inferred fromsensitivefor backwards compatibility and is not sent to the API.
- key String
- The name of the Environment Variable.
- project
Id 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. Secrets are supported in all target environments, including Development.
- comment String
- A comment explaining what the environment variable is for.
- custom
Environment List<String>Ids - The IDs of Custom Environments that the Environment Variable should be present on. At least one of
targetorcustom_environment_idsmust be set. - git
Branch String - The git branch of the Environment Variable.
- targets List<String>
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. At least one oftargetorcustom_environment_idsmust be set. - team
Id String - The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
- 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. - value
Wo NumberVersion - An integer used to trigger an update to
value_wo. Increment this value when an update to the write-only value is required. - visibility String
- Controls how the environment variable is categorized:
config(configuration values) orsecret(secret values). When omitted, visibility is inferred fromsensitivefor backwards compatibility and is not sent to the API.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectEnvironmentVariable 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 ProjectEnvironmentVariable Resource
Get an existing ProjectEnvironmentVariable 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?: ProjectEnvironmentVariableState, opts?: CustomResourceOptions): ProjectEnvironmentVariable@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
comment: Optional[str] = None,
custom_environment_ids: Optional[Sequence[str]] = None,
git_branch: Optional[str] = None,
key: Optional[str] = None,
project_id: Optional[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,
value_wo_version: Optional[int] = None,
visibility: Optional[str] = None) -> ProjectEnvironmentVariablefunc GetProjectEnvironmentVariable(ctx *Context, name string, id IDInput, state *ProjectEnvironmentVariableState, opts ...ResourceOption) (*ProjectEnvironmentVariable, error)public static ProjectEnvironmentVariable Get(string name, Input<string> id, ProjectEnvironmentVariableState? state, CustomResourceOptions? opts = null)public static ProjectEnvironmentVariable get(String name, Output<String> id, ProjectEnvironmentVariableState state, CustomResourceOptions options)resources: _: type: vercel:ProjectEnvironmentVariable get: id: ${id}import {
to = vercel_project_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.
- Comment string
- A comment explaining what the environment variable is for.
- Custom
Environment List<string>Ids - The IDs of Custom Environments that the Environment Variable should be present on. At least one of
targetorcustom_environment_idsmust be set. - Git
Branch string - The git branch of the Environment Variable.
- Key string
- The name of the Environment Variable.
- Project
Id 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. Secrets are supported in all target environments, including Development.
- Targets List<string>
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. At least one oftargetorcustom_environment_idsmust be set. - Team
Id string - The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
- 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. - Value
Wo intVersion - An integer used to trigger an update to
value_wo. Increment this value when an update to the write-only value is required. - Visibility string
- Controls how the environment variable is categorized:
config(configuration values) orsecret(secret values). When omitted, visibility is inferred fromsensitivefor backwards compatibility and is not sent to the API.
- Comment string
- A comment explaining what the environment variable is for.
- Custom
Environment []stringIds - The IDs of Custom Environments that the Environment Variable should be present on. At least one of
targetorcustom_environment_idsmust be set. - Git
Branch string - The git branch of the Environment Variable.
- Key string
- The name of the Environment Variable.
- Project
Id 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. Secrets are supported in all target environments, including Development.
- Targets []string
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. At least one oftargetorcustom_environment_idsmust be set. - Team
Id string - The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
- 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. - Value
Wo intVersion - An integer used to trigger an update to
value_wo. Increment this value when an update to the write-only value is required. - Visibility string
- Controls how the environment variable is categorized:
config(configuration values) orsecret(secret values). When omitted, visibility is inferred fromsensitivefor backwards compatibility and is not sent to the API.
- comment string
- A comment explaining what the environment variable is for.
- custom_
environment_ list(string)ids - The IDs of Custom Environments that the Environment Variable should be present on. At least one of
targetorcustom_environment_idsmust be set. - git_
branch string - The git branch of the Environment Variable.
- key string
- The name of the Environment Variable.
- project_
id 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. Secrets are supported in all target environments, including Development.
- targets list(string)
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. At least one oftargetorcustom_environment_idsmust be set. - team_
id string - The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
- 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. - value_
wo_ numberversion - An integer used to trigger an update to
value_wo. Increment this value when an update to the write-only value is required. - visibility string
- Controls how the environment variable is categorized:
config(configuration values) orsecret(secret values). When omitted, visibility is inferred fromsensitivefor backwards compatibility and is not sent to the API.
- comment String
- A comment explaining what the environment variable is for.
- custom
Environment List<String>Ids - The IDs of Custom Environments that the Environment Variable should be present on. At least one of
targetorcustom_environment_idsmust be set. - git
Branch String - The git branch of the Environment Variable.
- key String
- The name of the Environment Variable.
- project
Id 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. Secrets are supported in all target environments, including Development.
- targets List<String>
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. At least one oftargetorcustom_environment_idsmust be set. - team
Id String - The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
- 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. - value
Wo IntegerVersion - An integer used to trigger an update to
value_wo. Increment this value when an update to the write-only value is required. - visibility String
- Controls how the environment variable is categorized:
config(configuration values) orsecret(secret values). When omitted, visibility is inferred fromsensitivefor backwards compatibility and is not sent to the API.
- comment string
- A comment explaining what the environment variable is for.
- custom
Environment string[]Ids - The IDs of Custom Environments that the Environment Variable should be present on. At least one of
targetorcustom_environment_idsmust be set. - git
Branch string - The git branch of the Environment Variable.
- key string
- The name of the Environment Variable.
- project
Id 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. Secrets are supported in all target environments, including Development.
- targets string[]
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. At least one oftargetorcustom_environment_idsmust be set. - team
Id string - The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
- 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. - value
Wo numberVersion - An integer used to trigger an update to
value_wo. Increment this value when an update to the write-only value is required. - visibility string
- Controls how the environment variable is categorized:
config(configuration values) orsecret(secret values). When omitted, visibility is inferred fromsensitivefor backwards compatibility and is not sent to the API.
- comment str
- A comment explaining what the environment variable is for.
- custom_
environment_ Sequence[str]ids - The IDs of Custom Environments that the Environment Variable should be present on. At least one of
targetorcustom_environment_idsmust be set. - git_
branch str - The git branch of the Environment Variable.
- key str
- The name of the Environment Variable.
- project_
id 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. Secrets are supported in all target environments, including Development.
- targets Sequence[str]
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. At least one oftargetorcustom_environment_idsmust be set. - team_
id str - The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
- 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. - value_
wo_ intversion - An integer used to trigger an update to
value_wo. Increment this value when an update to the write-only value is required. - visibility str
- Controls how the environment variable is categorized:
config(configuration values) orsecret(secret values). When omitted, visibility is inferred fromsensitivefor backwards compatibility and is not sent to the API.
- comment String
- A comment explaining what the environment variable is for.
- custom
Environment List<String>Ids - The IDs of Custom Environments that the Environment Variable should be present on. At least one of
targetorcustom_environment_idsmust be set. - git
Branch String - The git branch of the Environment Variable.
- key String
- The name of the Environment Variable.
- project
Id 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. Secrets are supported in all target environments, including Development.
- targets List<String>
- The environments that the Environment Variable should be present on. Valid targets are either
production,preview, ordevelopment. At least one oftargetorcustom_environment_idsmust be set. - team
Id String - The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
- 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. - value
Wo NumberVersion - An integer used to trigger an update to
value_wo. Increment this value when an update to the write-only value is required. - visibility String
- Controls how the environment variable is categorized:
config(configuration values) orsecret(secret values). When omitted, visibility is inferred fromsensitivefor backwards compatibility and is not sent to the API.
Import
The pulumi import command can be used, for example:
If importing into a personal account, or with a team configured on the provider, simply use the project_id and environment variable id.
- project_id can be found in the project
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, or can be queried from Vercel API directly (https://vercel.com/docs/rest-api/endpoints/projects#retrieve-the-environment-variables-of-a-project-by-id-or-name)
Note also, that the value field for sensitive environment variables will be imported as null.
$ pulumi import vercel:index/projectEnvironmentVariable:ProjectEnvironmentVariable example prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/FdT2e1E5Of6Cihmt
Alternatively, you can import via the team_id, project_id and environment variable id.
- team_id can be found in the team
settingstab in the Vercel UI. - project_id can be found in the project
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, or can be queried from Vercel API directly (https://vercel.com/docs/rest-api/endpoints/projects#retrieve-the-environment-variables-of-a-project-by-id-or-name)
Note also, that the value field for sensitive environment variables will be imported as null.
$ pulumi import vercel:index/projectEnvironmentVariable:ProjectEnvironmentVariable example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/FdT2e1E5Of6Cihmt
When using value_wo, prefix either import ID format with write-only: to keep the value out of Terraform state. Set value_wo_version to control subsequent updates.
$ pulumi import vercel:index/projectEnvironmentVariable:ProjectEnvironmentVariable example 'write-only:team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/FdT2e1E5Of6Cihmt'
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 Thursday, Oct 15, 2026 by Pulumiverse