Allow Stack / Context Environment Variables without a value

I would like to be able to define an Environment Variable in Stack / Context without a value (null), so that I can set its content later, when I need it. The example might be:

TF_VAR_really_long_variable_name_that_I_do_not_remember = <no_value / null>

I also would like to be able to create this with spacelift_environment_variable TF resource.

Workaround
Delete the environment variable and add it again when needed, which requires going through the Terraform code to find out the name of the variable. Configure the environment variable with empty string, which requires changing the TF code to handle empty string instead of null.
Problem
We have a self-service portal with TF configuration for Stacks and Contexts. We can define two "types" of Environment Variables with spacelift_environment_variable resource: 1. normal env var = Value from the code is set in Spacelift every TF apply 2. secret env var = Env var is initiated in Spacelift with a dummy value from the code, the real value is inserted from the UI, changes are ignored by subsequent TF applies We would like to define a variable, which is defined by TF code, but: 1. the values are set only in UI 2. the values can have no value (null), so that we do not have to delete whole variable, when we want to unset the value. Alternatively, the variable could be in disabled / enabled state.

Please authenticate to join the conversation.

Upvoters
Status

πŸ”­ Discovery

Board

πŸ’‘ Feature Requests

Tags

UI/UX

Date

2 months ago

Subscribe to post

Get notified by email when there are changes.