Spacelift
PrivacyT&Cs
  • 👋Hello, Spacelift!
  • 🚀Getting Started
  • 🌠Main concepts
    • Stack
      • Creating a stack
      • Stack settings
      • Organizing stacks
      • Stack locking
      • Drift detection
    • Configuration
      • Environment
      • Context
      • Runtime configuration
        • YAML reference
    • Run
      • Task
      • Proposed run (preview)
      • Tracked run (deployment)
      • Module test case
      • User-Provided Metadata
      • Run Promotion
      • Pull Request Comments
    • Policy
      • Login policy
      • Access policy
      • Approval policy
      • Initialization policy
      • Plan policy
      • Push policy
      • Task policy
      • Trigger policy
    • Resources
    • Worker pools
    • VCS Agent Pools
  • 🛰️Platforms
    • Terraform
      • Module registry
      • External modules
      • Provider
      • State management
      • Terragrunt
      • Version management
      • Handling .tfvars
      • CLI Configuration
      • Cost Estimation
      • Resource Sanitization
      • Storing Complex Variables
      • Debugging Guide
    • Pulumi
      • Getting started
        • C#
        • Go
        • JavaScript
        • Python
      • State management
      • Version management
    • CloudFormation
      • Getting Started
      • Reference
      • Integrating with SAM
      • Integrating with the serverless framework
    • Kubernetes
      • Getting Started
      • Authenticating
      • Custom Resources
      • Helm
      • Kustomize
  • ⚙️Integrations
    • Audit trail
    • Cloud Integrations
      • Amazon Web Services (AWS)
      • Microsoft Azure
      • Google Cloud Platform (GCP)
    • Source Control
      • GitHub
      • GitLab
      • Azure DevOps
      • Bitbucket Cloud
      • Bitbucket Datacenter/Server
    • Docker
    • GraphQL API
    • Single sign-on
      • GitLab OIDC Setup Guide
      • Okta OIDC Setup Guide
      • OneLogin OIDC Setup Guide
      • Azure AD OIDC Setup Guide
      • AWS IAM Identity SAML 2.0 Setup Guide
    • Slack
    • Webhooks
  • 📖Product
    • Privacy
    • Security
    • Support
      • Statement of Support
    • Disaster Continuity
    • Billing
      • Stripe
      • AWS Marketplace
    • Terms and conditions
    • Refund Policy
  • Cookie Policy
Powered by GitBook
On this page
  • Stack settings
  • Module settings

Was this helpful?

  1. Main concepts
  2. Configuration
  3. Runtime configuration

YAML reference

PreviousRuntime configurationNextRun

Last updated 3 years ago

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 .

Stack settings

Module settings

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:

🌠
Stacks
version
stack_defaults
stacks
version
module_version
test_defaults
tests
id-settings
this section
YAML provides native methods to merge arrays and maps
semantic versioning scheme
this scheme
module
standard runtime settings
after applying changes
after first interacting with the backend
performing a custom task
planning changes
before applying changes
before first interacting with the backend
performing a custom task
planning changes
environment variables
root of your stack
custom runner image
Terraform version number to be used