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

Optional environment variable using null value #95

@wotschofsky

Description

@wotschofsky

I'd like to optionally declare an environment variable within vercel_deployment using a ternary/conditional expression by either setting a string or null.
For example:

environment = {
    MY_VAR = terraform.workspace == "default" ? "value" : null
}

This however throws an unhandled null value exception.

The only workaround right now is to instead set an empty string:

environment = {
    MY_VAR = terraform.workspace == "default" ? "value" : ""
}

I believe it would be a good addition also allow null values, and just ignore the environment entry then.

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