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
  • Run Execution
  • Policies
  • Modules

Was this helpful?

  1. Platforms

Pulumi

From this article you can learn how Pulumi is integrated into Spacelift

PreviousDebugging GuideNextGetting started

Last updated 4 years ago

Was this helpful?

Feature previews are subject to change, may contain bugs, and have not yet been ironed out based on real production usage.

On a high level, has a very similar flow to Terraform. It uses a state backend, provides dry run functionality, reconciles the actual world with the desired state. In this article we'll dive into how each of the concepts in Spacelift translates into working with Pulumi.

However, if you're the type that prefers to start with doing, instead of reading too much, there are quickstarts for each of the runtimes supported by Pulumi:

In case you're just getting started with Pulumi, we'd recommend you to start with JavaScript. Believe it or not, it's actually the most pleasant experience we had with Pulumi! Later you can also easily switch to languages which compile to JavaScript, like TypeScript or ClojureScript.

The high level concepts of Spacelift don't change when used with Pulumi. Below, we'll cover a few lower level details, which may be of interest.

Run Execution

Initialization

Previously described in , in Pulumi the initialization will run:

  • pulumi login with your configured login URL

  • pulumi stack select --create --select with your configured Pulumi stack name (the one you set in vendor-specific settings, not the Spacelift name)

It will then commence to run all pre-initialization hooks.

Planning

We run pulumi preview --refresh --diff --show-replacement-steps in order to show planned changes.

Applying

We run pulumi up --refresh --diff --show-replacement-steps in order to apply changes.

Policies

Most policies don't change at all. The one that changes most is the plan policy. Instead of the terraform raw plan in the terraform field, you'll get a pulumi field with the raw Pulumi plan and the following schema:

{
  "pulumi": {
    "steps": [
      {
        "new": {
          "custom": "boolean",
          "id": "string",
          "inputs": "object - input properties",
          "outputs": "object - output properties",
          "parent": "string - parent resource of this resource",
          "provider": "string - provider this resource stems from",
          "type": "string - resource type",
          "urn": "string - urn of this resource"
        },
        "old": {
          "custom": "boolean",
          "id": "string",
          "inputs": "object - input properties",
          "outputs": "object - output properties",
          "parent": "string - parent resource of this resource",
          "provider": "string - provider this resource stems from",
          "type": "string - resource type",
          "urn": "string - urn of this resource"
        },
        "op": "string - same, refresh, create, update, delete, create-replacement or delete-replaced",
        "provider": "string - provider this resource stems from",
        "type": "string - resource type",
        "urn": "string - urn of this resource"
      }
    ]
  },
  "spacelift": {"...": "..."}
}

Pulumi secrets are detected and encoded as "[secret]" instead of the actual value, that's why there's no other string sanitization going on with Pulumi plans.

Modules

Spacelift module CI/CD isn't currently available for Pulumi.

🛰️
Pulumi
C#
Go
JavaScript
Python
Run Initializing
Stack