Storing Complex Variables
Describes how to store complex Terraform variable types within Spacelift Contexts and/or a Spacelift Stack's environment.
Last updated
Was this helpful?
Describes how to store complex Terraform variable types within Spacelift Contexts and/or a Spacelift Stack's environment.
Last updated
Was this helpful?
Terraform supports a variety of variable types such as string
, number
, list
, bool
, and map
. The full list of Terraform's variable types can be found in the Terraform documentation .
When using "complex" variable types with Spacelift such as map
and list
you'll need to utilize Terraform's function when storing these variables as an environment variable in your Spacelift Stack or .
Notice the use of the jsonencode
function when storing these complex variable types. This will allow you to successfully store these variable types within Spacelift.
When consuming complex variable types in your environment, there is no need to use the jsondecode()
function.