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
  • Special Environment Variables
  • CloudFormation Stack Parameters
  • CloudFormation Stack Capabilities
  • Available Computed Environment Variables
  • Permissions

Was this helpful?

  1. Platforms
  2. CloudFormation

Reference

Details about all available CloudFormation-specific configuration options.

Stack Settings

  • Region - AWS region in which to create and execute the CloudFormation Stack.

  • Stack Name - The name for the CloudFormation Stack controlled by this Spacelift Stack.

  • Entry Template File - The path to the JSON or YAML file describing your root CloudFormation Stack. If you're generating CloudFormation code using a tool like SAM, point this to the file containing the generated template.

  • Template Bucket - S3 bucket to store CloudFormation templates in. Each created object will be prefixed by the current run ID like this: <run id>/artifact_name

Special Environment Variables

CloudFormation Stack Parameters

Use this if your CloudFormation template requires parameters to be specified.

Each environment variable of the form CF_PARAM_xyz will be interpreted as the value for the parameter xyz.

For example, with this template snippet:

Parameters:
  InstanceTypeParameter:
    Type: String
    AllowedValues:
      - t2.micro
      - t2.small
    Description: Enter t2.micro or t2.small.

In order to specify the InstanceTypeParameter add an environment variable to your Stack CF_PARAM_InstanceTypeParameter and set its value to i.e. t2.micro

CloudFormation Stack Capabilities

Available Computed Environment Variables

To ease writing reusable scripts and hooks for your CloudFormation Stacks, the following environment variables are computed for each run: CF_METADATA_REGION, CF_METADATA_STACK_NAME, CF_METADATA_ENTRY_TEMPLATE_FILE, CF_METADATA_TEMPLATE_BUCKET.

Permissions

PreviousGetting StartedNextIntegrating with SAM

Last updated 3 years ago

Was this helpful?

Some functionalities available to CloudFormation Stacks need to be explicitly acknowledged using . You can configure capabilities in Spacelift using environment variables of the form CF_CAPABILITY_xyz and set them to 1.

As of the time of writing this page, available capabilities are CF_CAPABILITY_IAM, CF_CAPABILITY_NAMED_IAM, and CF_CAPABILITY_AUTO_EXPAND. Detailed descriptions can be found in the .

Their values are set to the respective .

You need to provide Spacelift with access to your AWS account. You can either do this using the , provide ambient credentials on private workers, or pass environment variables directly.

🛰️
capabilities
AWS API documentation
Stack settings
AWS Integration