这是indexloc提供的服务,不要输入任何密码
Skip to content

Feature: Support for Vercel's Custom Environments in target field #245

@Dvinge

Description

@Dvinge

Description

The current implementation of vercel_project_environment_variable and vercel_project_environment_variables resources restricts the target field to only accept production, preview, or development. However, Vercel has recently released Custom Environments feature which allows for user-defined environment names.

Current Behavior

The provider enforces a strict validation on the target field, only allowing:

  • production
  • preview
  • development

Expected Behavior

The target field should accept any string value to support Vercel's Custom Environments feature, while maintaining backwards compatibility with the existing environment names.

Example Usage

resource "vercel_project_environment_variable" "example" {
  project_id = vercel_project.example.id
  key        = "API_KEY"
  value      = "secret-value"
  target     = ["staging"]  # Currently not possible
}

Documentation for Custom Environments: https://vercel.com/docs/deployments/custom-environments
Vercel CLI using target for environments: https://vercel.com/docs/cli/deploy#target

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions