Best of SpaceliftSeptember 2025

  1. 1
    Article
    Avatar of spaceliftSpacelift·36w

    Upgrading Our Infrastructure with OpenTofu

    TrueCar migrated over 700 infrastructure stacks from Terraform to OpenTofu following HashiCorp's license change to Business Source License. The migration involved upgrading all stacks to Terraform 1.5.5, then moving to OpenTofu 1.6.2, and finally to OpenTofu 1.9.0. Key challenges included managing multiple versions, coordinating changes across a monorepo, and preventing accidental Terraform usage. OpenTofu's early variable evaluation feature enabled dynamic state file configuration that automatically breaks Terraform compatibility, eliminating the risk of state corruption from mixed tool usage.

  2. 2
    Article
    Avatar of spaceliftSpacelift·38w

    GitOps vs Infrastructure as Code (IaC): Differences & Overlaps

    GitOps and Infrastructure as Code (IaC) are complementary but distinct practices. IaC focuses on defining infrastructure through code, while GitOps governs how that infrastructure is continuously deployed and maintained using Git as the single source of truth. Key differences include GitOps using pull-based workflows with continuous reconciliation versus IaC's typically push-based, CI-triggered approach. GitOps emphasizes automated deployment and compliance through Git, while IaC concentrates on infrastructure provisioning and definition. Together, they enable scalable, secure, and automated infrastructure management.

  3. 3
    Article
    Avatar of spaceliftSpacelift·36w

    Docker Multistage Builds: How to Optimize Your Images

    Docker multistage builds enable developers to use multiple base images in a single Dockerfile, allowing complex build processes while keeping final images lightweight. By copying only necessary files between stages, developers can reduce image sizes, improve build efficiency, and simplify Dockerfile maintenance. The technique is particularly useful for separating build tools from runtime environments, such as compiling code in one stage and deploying only the compiled output in a minimal final image.