YAML reference
Last updated
Was this helpful?
Last updated
Was this helpful?
This document is a reference for the Spacelift configuration keys that are used in the .spacelift/config.yml file to configure one or more .
version
The version property is optional and currently ignored but for the sake of completeness you may want to set the value to "1".
stack_defaults
stack_defaults
represent default settings that will apply to every stack defined in the map. Any default setting is overridden by an explicitly set stack-specific value.
Key
Required
Type
Description
after_apply
N
list<string>
after_destroy
N
list<string>
List of commands executed after destroying managed resources.
after_init
N
list<string>
after_perform
N
list<string>
after_plan
N
list<string>
before_apply
N
list<string>
before_destroy
N
list<string>
List of commands executed before destroying managed resources.
before_init
N
list<string>
before_perform
N
list<string>
before_plan
N
list<string>
environment
N
map<string, string>
project_root
N
string
runner_image
N
string
terraform_version
N
string
stacks
module_version
test_defaults
tests
Key
Required
Type
Description
name
Y
string
Unique name of the test case
negative
N
bool
Indicates whether the test is negative (expected to fail)
List of commands executed .
List of commands executed (eg. terraform init).
List of commands executed after
List of commands executed after
List of commands executed .
List of commands executed (eg. terraform init
).
List of commands executed before
List of commands executed before
Map of extra and their values passed to the job
Optional folder inside the repository serving as the
Name of the , if any
For Terraform stacks,
The stacks section is a map using stack public ID (slug) as keys and stack settings - described in - as values. If you're using this mapping together with stack defaults, note that any default setting is overridden by an explicitly set stack-specific value. This is particularly important for list and map fields where one may assume that these are merged. In practice, they're not merged - they're replaced. If you want merging semantics, .
Module version is a required string value that must conform to the . Note that pre-releases and builds/nightlies are not supported - only the standard $major.$minor.$patch
format will work.
Test defaults are runtime settings following that will apply to all test cases for a .
The tests
section represents a list of test cases for a module, each containing the in addition to the test-specific settings: