Runtime configuration
The runtime configuration is an optional setup applied to individual runs instead of being global to the stack. It's defined in .spacelift/config.yml
YAML file at the root of your repository. A single file is used to define settings for all stacks associated with its host Git repository, so the file structure looks like this:
.
Purpose of runtime configuration
The whole concept of runtime configuration may initially sound unnecessary, but it ultimately allows flexibility that would otherwise be hard to achieve. In general, its purpose is to preview effects of changes not related to the source code (eg. Terraform or Pulumi version upgrades, variable changes etc.), before they become an established part of your infra.
Stacks
configuration block
Stacks
configuration blockbefore_
and after_
hooks
before_
and after_
hooksbefore_init
after_init
before_plan
after_plan
before_apply
after_apply
before_perform
after_perform
before_destroy
after_destroy
environment
map
environment
mapproject_root
setting
project_root
settingProject root is the path of your project directory inside the Hub repository. You can use this setting to point Spacelift to the right place if the repo contains source code for multiple stacks in various folders or serves multiple purposes like those increasingly popular monorepos combining infrastructure definitions with source code, potentially even for multiple applications.
runner_image
setting
runner_image
settingThe runner image is the Docker image used to run your workloads. By making it a runtime setting, Spacelift allows testing the image before it modifies your infrastructure.
terraform_version
setting
terraform_version
settingLast updated
Was this helpful?