Skip to content

OpenTofu and Terraform»

What is Terraform?»

Terraform is a full-featured, battle-tested Infrastructure as Code tool. It has a vast ecosystem of providers to interact with many vendors from cloud providers such as AWS, Azure and GCP to monitoring such as New Relic and Datadog, and many many more.

There are also plenty of community-managed modules and tools to get you started in no time.

What is OpenTofu?»

OpenTofu is an open-source fork of Terraform that emerged when HashiCorp changed Terraform's license from MPL v2.0 to the Business Source License (BSL) in August 2023. It was started by a coalition of companies (including us!) to maintain a fully open-source alternative and is now managed by the Linux Foundation.

OpenTofu is fully compatible with Terraform and aims to maintain that compatibility while adding new features and improvements. It uses the same HCL configuration language, supports the same providers and modules, and can work with existing Terraform state files.

For users concerned about license changes or who prefer an open-source solution backed by a vendor-neutral foundation, OpenTofu provides a compelling alternative while offering the same core functionality and ecosystem benefits as Terraform. The compatibiilty matrix between these two tools is independently maintained here.

Why use Spacelift with OpenTofu or Terraform?»

Spacelift helps you manage the complexities and compliance challenges of using OpenTofu/Terraform. It brings with it a GitOps flow, so your infrastructure repository is synced with your OpenTofu/Terraform Stacks, and pull requests show you a preview of what they're planning to change. It also has an extensive selection of policies, which lets you automate compliance checks and build complex multi-stack workflows.

You can also use Spacelift to mix and match OpenTofu, Terraform, Pulumi, and CloudFormation Stacks and have them talk to one another. For example, you can set up OpenTofu/Terraform Stacks to provision required infrastructure (like an ECS/EKS cluster with all its dependencies) and then connect that to a CloudFormation Stack which then transactionally deploys your services there using trigger policies and the Spacelift provider run resources for workflow orchestration and Contexts to export OpenTofu/Terraform outputs as CloudFormation input parameters.

Does Spacelift support OpenTofu/Terraform wrappers?»

Yes! We support Terragrunt and Cloud Development Kit for Terraform (CDKTF). You can read more about it in the relevant subpages of this document.

Additional resources»