1. Packages
  2. Vercel
  3. API Docs
  4. ProjectEnvironmentVariable
Vercel v1.15.0 published on Wednesday, Mar 19, 2025 by Pulumiverse

vercel.ProjectEnvironmentVariable

Explore with Pulumi AI

vercel logo
Vercel v1.15.0 published on Wednesday, Mar 19, 2025 by Pulumiverse

    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,
                                   value: Optional[str] = None,
                                   comment: Optional[str] = None,
                                   custom_environment_ids: Optional[Sequence[str]] = None,
                                   git_branch: Optional[str] = None,
                                   sensitive: Optional[bool] = None,
                                   targets: Optional[Sequence[str]] = None,
                                   team_id: 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.
    
    

    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",
        Value = "string",
        Comment = "string",
        CustomEnvironmentIds = new[]
        {
            "string",
        },
        GitBranch = "string",
        Sensitive = false,
        Targets = new[]
        {
            "string",
        },
        TeamId = "string",
    });
    
    example, err := vercel.NewProjectEnvironmentVariable(ctx, "projectEnvironmentVariableResource", &vercel.ProjectEnvironmentVariableArgs{
    	Key:       pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    	Value:     pulumi.String("string"),
    	Comment:   pulumi.String("string"),
    	CustomEnvironmentIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	GitBranch: pulumi.String("string"),
    	Sensitive: pulumi.Bool(false),
    	Targets: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TeamId: pulumi.String("string"),
    })
    
    var projectEnvironmentVariableResource = new ProjectEnvironmentVariable("projectEnvironmentVariableResource", ProjectEnvironmentVariableArgs.builder()
        .key("string")
        .projectId("string")
        .value("string")
        .comment("string")
        .customEnvironmentIds("string")
        .gitBranch("string")
        .sensitive(false)
        .targets("string")
        .teamId("string")
        .build());
    
    project_environment_variable_resource = vercel.ProjectEnvironmentVariable("projectEnvironmentVariableResource",
        key="string",
        project_id="string",
        value="string",
        comment="string",
        custom_environment_ids=["string"],
        git_branch="string",
        sensitive=False,
        targets=["string"],
        team_id="string")
    
    const projectEnvironmentVariableResource = new vercel.ProjectEnvironmentVariable("projectEnvironmentVariableResource", {
        key: "string",
        projectId: "string",
        value: "string",
        comment: "string",
        customEnvironmentIds: ["string"],
        gitBranch: "string",
        sensitive: false,
        targets: ["string"],
        teamId: "string",
    });
    
    type: vercel:ProjectEnvironmentVariable
    properties:
        comment: string
        customEnvironmentIds:
            - string
        gitBranch: string
        key: string
        projectId: string
        sensitive: false
        targets:
            - string
        teamId: string
        value: 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.
    ProjectId string
    The ID of the Vercel project.
    Value string
    The value of the Environment Variable.
    Comment string
    A comment explaining what the environment variable is for.
    CustomEnvironmentIds List<string>
    The IDs of Custom Environments that the Environment Variable should be present on. At least one of target or custom_environment_ids must be set.
    GitBranch string
    The git branch of the Environment Variable.
    Sensitive bool
    Whether the Environment Variable is sensitive or not. (May be affected by a team-wide environment variable policy)
    Targets List<string>
    The environments that the Environment Variable should be present on. Valid targets are either production, preview, or development. At least one of target or custom_environment_ids must be set.
    TeamId string
    The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
    Key string
    The name of the Environment Variable.
    ProjectId string
    The ID of the Vercel project.
    Value string
    The value of the Environment Variable.
    Comment string
    A comment explaining what the environment variable is for.
    CustomEnvironmentIds []string
    The IDs of Custom Environments that the Environment Variable should be present on. At least one of target or custom_environment_ids must be set.
    GitBranch string
    The git branch of the Environment Variable.
    Sensitive bool
    Whether the Environment Variable is sensitive or not. (May be affected by a team-wide environment variable policy)
    Targets []string
    The environments that the Environment Variable should be present on. Valid targets are either production, preview, or development. At least one of target or custom_environment_ids must be set.
    TeamId string
    The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
    key String
    The name of the Environment Variable.
    projectId String
    The ID of the Vercel project.
    value String
    The value of the Environment Variable.
    comment String
    A comment explaining what the environment variable is for.
    customEnvironmentIds List<String>
    The IDs of Custom Environments that the Environment Variable should be present on. At least one of target or custom_environment_ids must be set.
    gitBranch String
    The git branch of the Environment Variable.
    sensitive Boolean
    Whether the Environment Variable is sensitive or not. (May be affected by a team-wide environment variable policy)
    targets List<String>
    The environments that the Environment Variable should be present on. Valid targets are either production, preview, or development. At least one of target or custom_environment_ids must be set.
    teamId String
    The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
    key string
    The name of the Environment Variable.
    projectId string
    The ID of the Vercel project.
    value string
    The value of the Environment Variable.
    comment string
    A comment explaining what the environment variable is for.
    customEnvironmentIds string[]
    The IDs of Custom Environments that the Environment Variable should be present on. At least one of target or custom_environment_ids must be set.
    gitBranch string
    The git branch of the Environment Variable.
    sensitive boolean
    Whether the Environment Variable is sensitive or not. (May be affected by a team-wide environment variable policy)
    targets string[]
    The environments that the Environment Variable should be present on. Valid targets are either production, preview, or development. At least one of target or custom_environment_ids must be set.
    teamId string
    The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
    key str
    The name of the Environment Variable.
    project_id str
    The ID of the Vercel project.
    value str
    The value of the Environment Variable.
    comment str
    A comment explaining what the environment variable is for.
    custom_environment_ids Sequence[str]
    The IDs of Custom Environments that the Environment Variable should be present on. At least one of target or custom_environment_ids must be set.
    git_branch str
    The git branch of the Environment Variable.
    sensitive bool
    Whether the Environment Variable is sensitive or not. (May be affected by a team-wide environment variable policy)
    targets Sequence[str]
    The environments that the Environment Variable should be present on. Valid targets are either production, preview, or development. At least one of target or custom_environment_ids must 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.
    key String
    The name of the Environment Variable.
    projectId String
    The ID of the Vercel project.
    value String
    The value of the Environment Variable.
    comment String
    A comment explaining what the environment variable is for.
    customEnvironmentIds List<String>
    The IDs of Custom Environments that the Environment Variable should be present on. At least one of target or custom_environment_ids must be set.
    gitBranch String
    The git branch of the Environment Variable.
    sensitive Boolean
    Whether the Environment Variable is sensitive or not. (May be affected by a team-wide environment variable policy)
    targets List<String>
    The environments that the Environment Variable should be present on. Valid targets are either production, preview, or development. At least one of target or custom_environment_ids must be set.
    teamId String
    The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.

    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 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) -> ProjectEnvironmentVariable
    func 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}
    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:
    Comment string
    A comment explaining what the environment variable is for.
    CustomEnvironmentIds List<string>
    The IDs of Custom Environments that the Environment Variable should be present on. At least one of target or custom_environment_ids must be set.
    GitBranch string
    The git branch of the Environment Variable.
    Key string
    The name of the Environment Variable.
    ProjectId string
    The ID of the Vercel project.
    Sensitive bool
    Whether the Environment Variable is sensitive or not. (May be affected by a team-wide environment variable policy)
    Targets List<string>
    The environments that the Environment Variable should be present on. Valid targets are either production, preview, or development. At least one of target or custom_environment_ids must be set.
    TeamId 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
    The value of the Environment Variable.
    Comment string
    A comment explaining what the environment variable is for.
    CustomEnvironmentIds []string
    The IDs of Custom Environments that the Environment Variable should be present on. At least one of target or custom_environment_ids must be set.
    GitBranch string
    The git branch of the Environment Variable.
    Key string
    The name of the Environment Variable.
    ProjectId string
    The ID of the Vercel project.
    Sensitive bool
    Whether the Environment Variable is sensitive or not. (May be affected by a team-wide environment variable policy)
    Targets []string
    The environments that the Environment Variable should be present on. Valid targets are either production, preview, or development. At least one of target or custom_environment_ids must be set.
    TeamId 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
    The value of the Environment Variable.
    comment String
    A comment explaining what the environment variable is for.
    customEnvironmentIds List<String>
    The IDs of Custom Environments that the Environment Variable should be present on. At least one of target or custom_environment_ids must be set.
    gitBranch String
    The git branch of the Environment Variable.
    key String
    The name of the Environment Variable.
    projectId String
    The ID of the Vercel project.
    sensitive Boolean
    Whether the Environment Variable is sensitive or not. (May be affected by a team-wide environment variable policy)
    targets List<String>
    The environments that the Environment Variable should be present on. Valid targets are either production, preview, or development. At least one of target or custom_environment_ids must be set.
    teamId 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
    The value of the Environment Variable.
    comment string
    A comment explaining what the environment variable is for.
    customEnvironmentIds string[]
    The IDs of Custom Environments that the Environment Variable should be present on. At least one of target or custom_environment_ids must be set.
    gitBranch string
    The git branch of the Environment Variable.
    key string
    The name of the Environment Variable.
    projectId string
    The ID of the Vercel project.
    sensitive boolean
    Whether the Environment Variable is sensitive or not. (May be affected by a team-wide environment variable policy)
    targets string[]
    The environments that the Environment Variable should be present on. Valid targets are either production, preview, or development. At least one of target or custom_environment_ids must be set.
    teamId 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
    The value of the Environment Variable.
    comment str
    A comment explaining what the environment variable is for.
    custom_environment_ids Sequence[str]
    The IDs of Custom Environments that the Environment Variable should be present on. At least one of target or custom_environment_ids must 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 or not. (May be affected by a team-wide environment variable policy)
    targets Sequence[str]
    The environments that the Environment Variable should be present on. Valid targets are either production, preview, or development. At least one of target or custom_environment_ids must 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
    The value of the Environment Variable.
    comment String
    A comment explaining what the environment variable is for.
    customEnvironmentIds List<String>
    The IDs of Custom Environments that the Environment Variable should be present on. At least one of target or custom_environment_ids must be set.
    gitBranch String
    The git branch of the Environment Variable.
    key String
    The name of the Environment Variable.
    projectId String
    The ID of the Vercel project.
    sensitive Boolean
    Whether the Environment Variable is sensitive or not. (May be affected by a team-wide environment variable policy)
    targets List<String>
    The environments that the Environment Variable should be present on. Valid targets are either production, preview, or development. At least one of target or custom_environment_ids must be set.
    teamId 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
    The value of the Environment Variable.

    Package Details

    Repository
    vercel pulumiverse/pulumi-vercel
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vercel Terraform Provider.
    vercel logo
    Vercel v1.15.0 published on Wednesday, Mar 19, 2025 by Pulumiverse