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
  • Introduction to Main Concepts
  • Stacks
  • State Management
  • Worker Pools
  • Policies
  • Cloud Integration
  • Change Workflow
  • Step by Step
  • Step 1: Create your Spacelift account
  • Step 2: Connect your Version Control System (VCS)
  • Step 3: Create Your First Spacelift Stack
  • Step 4: Trigger your First Run
  • Additional Reading

Was this helpful?

Getting Started

A quick start on creating a Spacelift account, linking it to a VCS, and creating your first Spacelift stack.

PreviousHello, Spacelift!NextStack

Last updated 3 years ago

Was this helpful?

Hello and welcome to Spacelift! In this guide we will briefly introduce some key concepts that you need to know to work with Spacelift. These concepts will be followed by to help you create and configure your first run with Spacelift.

Introduction to Main Concepts

Stacks

A stack is a central entity in Spacelift. It connects with your source control repository and manages the state of infrastructure. It facilitates integration with cloud providers (AWS, Azure, Google Cloud) and other important Spacelift components. You can learn more about Stacks in Spacelift .

State Management

State can be managed by your backend, or for Terraform projects - can be imported into Spacelift. It is not required to let Spacelift manage your infrastructure state.

Worker Pools

Spacelift provides two options for managing the underly compute used by Spacelift: public or private worker pools. Public worker pools are managed by Spacelift whereas private pools are hosted by you. Due to security and compliance requirements, several of our customers choose private pools to manage their infrastructure. You can learn more about worker pools .

Policies

Spacelift policies provide a way to express rules as code, rules that manage your Infrastructure as Code (IaC) environment, and help make common decisions such as login, access, and execution. Policies are based on the project and can be defined using its rule language Rego. You can learn more about policies .

Cloud Integration

Spacelift provides native integration with AWS, Azure and Google Cloud (GCP). Integration with other cloud providers is also possible via programmatic connection with their identity services. You can learn more about in Spacelift detailed documentation.

Change Workflow

Step by Step

Step 1: Create your Spacelift account

Select from the options available to create your Spacelift account:

For users who select GitHub: The GitHub Organization/account name selected will be used as your Spacelift account name.

Step 2: Connect your Version Control System (VCS)

The flow for connecting GitHub as a VCS provider is slightly different when using GitHub to sign in compared to the other sign-in options (GitLab, Google). Follow the section that is applicable to you.

GitHub was used as a sign-in option:

Now login to the Spacelift console, you are ready to create your first stack!

Google or GitLab was used as a sign-in option:

This sub-section is intended for users who created their Spacelift account using Google or GitLab.

Step 3: Create Your First Spacelift Stack

  1. Click on the Add Stack button.

In the Integrate VCS tab, choose your VCS provider, select the repository that you gave access to Spacelift in the first step and select a branch that you want to be attached with your Stack. Click Continue.

Click on Continue to configure the backend.

Choose Terraform as your backend with a supported version. Leave the default option to let Spacelift manage state for this stack.

Leave the default options checked for Define Behavior and click Continue.

Give your stack a name and click Save Stack.

Step 4: Trigger your First Run

After saving your stacks, you will be redirected to the Runs screen for the stack you just created. Click on Trigger to kick start a Spacelift run that will check out the source code, run terraform commands on it and then present you with an option to apply (confirm) these changes.

After clicking Trigger, you will be taken directly into the run. Click on Confirm and your changes will be applied. Your output will look different based on your code repository and the resources it creates.

Additional Reading

Spacelift deeply integrates with your Version Control System (VCS). Pull requests are evaluated by Spacelift to provide a preview of the changes being made to infrastructure; these changes are deployed automatically when PRs are merged. You can learn more about here.

This section provides step-by-step instructions to help you set up and get the most out of Spacelift. If you want to learn about core concepts, please have a look at the section.

You can get started with either forking our Terraform Starter repository and testing all Spacelift capabilities in under 15 minutes or you can explore Spacelift on your own by adding your own repository and going from zero to fully managing your cloud resources.

On the , click on the "Get started" button:

In this section we will be connecting GitHub as our VCS. You can find more information about other supported VCS providers .

If you created your Spacelift account using GitHub, see please follow the "" sub-section. If you created your account using Google or GitLab, please see the "" sub-section.

if you have not already installed it.

Please select any of your GitHub repositories that create local resources (we will not be integrating with any cloud providers to keep this guide simple and quick). If you do not have a GitHub repository of this kind, you can fork our (Make sure to allow the installed GitHub app access to the forked repository).

To connect GitHub as your VCS, follow the guide for .

Please select any of your GitHub repositories that create local resources (we will not be integrating with any cloud providers to keep this guide simple and quick). If you do not have a GitHub repository of this kind, you can fork our (Make sure to allow the installed GitHub app access to the forked repository).

Please refer to the section of the documentation to connect a different VCS.

Congratulation! You've just created your first Spacelift stack and completed your first deployment!

Learn how to as a cloud provider for your infrastructure

Try with stacks for common use cases

Using and with stacks

🚀
🚀
detailed instructions
detailed documentation
here
Open Policy Agent
here
cloud provider integration
VCS integration
main concepts
here
Spacelift home page
here
GitHub was used as a sign-in option
Google or GitLab was used as a sign-in option
Install the Spacelift Github App
terraform-starter repository
setting up the GitHub integration
terraform-starter repository
Source Control
integrate with AWS
creating and attaching policies
Spacelift workflow with Github change requests (PR)
Setting up private workers for Spacelift
environment variables
contexts
Configuring stack behavior with common settings