Getting to know managed IaC platforms such as Terraform Cloud, Spacelift, env0, and Scalr: remote execution, VCS integration, managed state management, private module registries, policy enforcement, and when organizations should adopt them.

After building our own CI/CD pipeline in episode 13 — writing GitHub Actions and GitLab CI workflows for fmt, lint, security scan, plan, all the way to apply with an approval gate — in this episode we'll discuss an alternative that's increasingly popular in large organizations: managed IaC platforms such as Terraform Cloud (now called HCP Terraform), Spacelift, env0, and Scalr.
In episode 13, you may have realized that building a correct IaC pipeline requires many components: OIDC configuration, separate plan/apply workflows, environment protection, plan artifacts, and a state backend with locking. All of that is infrastructure work your own team has to maintain. The question now is: do we need to build and maintain all of that, or is there something that can manage it for us?
Managed IaC platforms answer that question by taking over those components as a managed service: remote execution runners, built-in VCS integration, state management with encryption & locking, a private module registry, and policy enforcement. Why is this topic important in the real world? Because once an organization has many teams and many Terraform stacks, the cost of maintaining self-managed pipelines becomes larger than the cost of a platform subscription — and those platforms also add a safety net (RBAC, audit log, policy) that's hard to build yourself at the same quality.
Let's be honest for a moment: everything built in episode 13 is correct and works. But if you work in an organization with 10 teams each managing 5 infrastructure stacks, that's 50 pipelines to maintain. Each pipeline needs configuration, versioning, monitoring, and a responsible person. At that point, platform engineering teams start asking: "why are we rebuilding the same wheel 50 times?"
A comparison of three Terraform execution models:
| Aspect | Local (Laptop) | Self-Managed CI/CD | Managed IaC Platform |
|---|---|---|---|
| Execution runner | Developer laptop | Team-owned agents/runners | Managed remote runners |
| State storage | Local file | Self-maintained backend (S3+DynamoDB) | Managed state + encryption + locking |
| VCS integration | Manual | Hand-built workflows | Built-in (GitHub/GitLab/Bitbucket) |
| Approval & RBAC | None | Manual environment protection | Built-in policy & roles |
| Audit trail | None | Pipeline logs | Complete audit log |
| Maintenance cost | Zero (but very risky) | High (many components) | Subscription, zero maintenance |
| Best suited for | Practice / solo | Teams wanting full control | Multi-team / enterprise organizations |
Note
It's important to understand: managed IaC platforms are not a replacement for Terraform or Terragrunt — they are a management layer on top of Terraform. The HCL code you write stays identical; what changes is where it's executed, how it's approved, and how state and policy are managed.
Even though each platform has its own uniqueness, the following five features are the backbone shared by almost all managed IaC platforms:
| Feature | Function | Real Impact |
|---|---|---|
| Remote Execution Runners | plan/apply execution happens on managed runners, not laptops | Stops "applying from laptops"; consistent environment |
| VCS Integration | Connects to GitHub/GitLab; auto-triggers a run per commit/PR | Automatic plan on every change, posts to the PR |
| State Management | State is stored, encrypted, and locked by the platform | No need for S3+DynamoDB, automatic backup & versioning |
| Private Module Registry | Hosts internal modules with versioning & documentation | Shares modules across teams without a public registry |
| Policy Enforcement | Rules (PaC) that block violating runs | Prevents misconfiguration before apply |
Each of these features is essentially something we built manually in the previous episodes, packaged into an integrated built-in feature. That's why adopting these platforms is often called "buying back time" for platform teams.
Here's a comparison of the four main platforms you should know:
| Platform | Vendor | Signature Features | Policy Engine | Pricing Model |
|---|---|---|---|---|
| HCP Terraform (Terraform Cloud) | HashiCorp | Fully integrated with the Terraform ecosystem, built-in Sentinel & OPA, Vault integration | Sentinel, OPA | Free (small scale) + per-user / per-run tier |
| Spacelift | Spacelift.io | Supports Terraform, OpenTofu, Pulumi, CloudFormation; OPA policies; very flexible workflows | OPA/Rego | Per-stack / per-concurrency |
| env0 | env0 | Self-service UI for developers, cost estimation, environment templating | OPA + Regula | Per-environment / per-user |
| Scalr | Scalr | Multi-tenant cost control, RBAC policies, enterprise SAML/SSO integration | OPA (custom) | Per-active-user |
These four platforms compete along three main axes: depth of the Terraform ecosystem (HCP Terraform excels because it's made by the same vendor), multi-tool flexibility (Spacelift and env0 support more than just Terraform), and enterprise cost control (Scalr and env0 stand out). None is "best" in absolute terms — it all depends on organizational needs, which we'll discuss in the adoption scenarios section.
To understand how these platforms work, let's break down the most common workflow: the VCS-driven workflow in HCP Terraform. The concept is the same across all platforms.
Once you connect a repository (e.g. GitHub) to a workspace, each of the following events triggers a run:
1. Developer pushes commit / opens PR → "Plan" run runs automatically on a remote runner
2. Plan finishes → the result is posted on the PR (status + diff)
3. Reviewer approves the PR → PR is merged to main
4. Merge to main → "Plan" run for main, then waits
5. Engineer clicks "Confirm & Apply" → "Apply" run is executed on a remote runner
6. State updated + audit log → the whole history is stored on the platformEach run has stages that look like a mini pipeline:
| Stage | Activity | Output |
|---|---|---|
| Plan | Refresh state → read the latest config → compute changes | Plan file + cost estimate |
| Apply (after approval) | Actually execute the changes to the cloud | Updated resources + new state |
Tip
Note that this VCS-driven flow is a ready-made implementation of what we built manually in episode 13: automatic plan on PR, human approval before apply, and locked state. These platforms remove almost all the burden of writing the workflow YAML we learned earlier — you just configure, rather than maintain pipeline code.
cloud Block ConfigurationHow does Terraform know it should run on the platform instead of locally? The answer is the cloud block in the configuration:
terraform {
cloud {
organization = "mycompany-infra"
workspaces {
project = "platform"
name = "prod-vpc"
}
}
}Once this block exists, running terraform init changes Terraform's behavior:
prod-vpc workspace in the cloud.terraform plan and terraform apply run from the CLI will delegate execution to a remote runner on the platform.terraform plan can even be triggered from a laptop without any cloud credentials — the result is sent back as logs.$ terraform init
Initializing HCP Terraform...
Initializing provider plugins...
- Finding latest version of hashicorp/aws...
Successfully configured the backend "cloud"! HCP Terraform will
automatically manage this state file and enable locking.Warning
Note the message above: "HCP Terraform will automatically manage this state file." This means state moves to the platform — no longer in your own S3 bucket. Make sure organizational policy allows state (which contains sensitive data) to reside with a third-party provider, or choose a self-hosted platform if regulations require it.
One of the most valuable features of managed platforms is policy enforcement — the application of Policy as Code, which we'll dive deep into in episode 16. Imagine the flow:
# (simple example, policy language simplified)
policy "no_public_s3" {
source = <<-EOF
deny[msg] {
resource := terraform.resources[s3_bucket]
resource.config.acl == "public-read"
msg := "S3 bucket must not be public-read"
}
EOF
}When a run produces a resource that violates a policy, the platform automatically blocks the apply — before the change reaches the cloud. This is a security layer that's usually the most expensive to build yourself at high quality, because policies are evaluated on every run and can't be skipped by engineers.
| Safety Layer | Self-Managed Execution | Managed Platform Execution |
|---|---|---|
| Code review in PR | Yes (human review) | Yes (VCS integration) |
| Reviewed plan | Yes | Yes + automatic post to PR |
| Policy enforcement | Needs manual integration (OPA/Checkov) | Built-in (Sentinel/OPA) on every run |
| RBAC & approval | Manual environment protection | Built-in RBAC + approval workflow |
Important
The Checkov/Trivy integration in the episode 13 pipeline is a static scan — it checks the code before apply. The policy engine on the platform (Sentinel/OPA) is a runtime guard — it checks the actual plan result against organizational policy. Both complement each other, they're not replacements. A good platform lets you run both.
So it doesn't stay abstract, let's look at a realistic adoption scenario.
Case study: PT Maju Teknologi, 8 teams, 40 Terraform stacks.
backend "s3" blocks are replaced with cloud blocks (leaving only a few for regulated data). The 40 stacks are migrated into 40 workspaces organized in per-team projects. GitHub Actions pipelines are trimmed — only bootstrap and non-Terraform tasks remain.Tip
The recommended migration pattern: start with one team and one stack (e.g. a non-critical stack), measure the impact, then expand. Don't migrate 40 stacks at once in the first week — platforms also need a "trusted" period. Use terraform init -migrate-state when moving from an old backend to a new workspace, exactly the pattern we learned in episode 5.
So your decision is well-informed, let's summarize the advantages and the things to consider:
| Advantages | Considerations / Disadvantages |
|---|---|
| State, runners, and pipeline fully managed | Monthly subscription cost (scaled per user/run) |
| Built-in policy + RBAC + audit | Data (state) resides with a third-party provider |
| Out-of-the-box VCS integration & approval | Dependence on the vendor (vendor lock-in) |
| Self-service for developers | Initial configuration (organization, project, workspace) takes time |
| Technically eliminates "applying from laptops" | Can feel like overkill for very small teams |
| Built-in private module registry | Optional: needs a team/owner to manage standards |
Note
A rule of thumb widely used by practitioners: below ~5 stacks & 1–2 teams, self-managed CI/CD (episode 13) is still sufficient and cheaper. Above that — many teams, centralized policy needs, and audit demands — managed IaC platforms start to be far cheaper in total cost of ownership, because platform team time is very valuable.
| Mistake | Symptom | Solution |
|---|---|---|
| Using the cloud block without realizing state moves | Sensitive data at the vendor without approval | Audit first, choose a regulation-compliant platform |
| Not using the policy engine | Platform's safety net inactive | Enable default policies + write organizational policies |
| Migrating 40 stacks at once | Confusion & incidents on day one | Start with non-critical stacks, incrementally |
Forgetting terraform init -migrate-state | Old state doesn't carry over → resources become orphaned | Use the migrate flag when switching backends |
| Removing the old CI/CD pipeline entirely | Losing non-Terraform tool integration | Combine: platform for Terraform, CI/CD for the rest |
| Letting everyone be a workspace admin | Approval & RBAC become meaningless | Apply minimal roles: developers plan, owners apply |
In this episode 14 we discussed how managed IaC platforms — HCP Terraform, Spacelift, env0, and Scalr — take over the components we built manually in episode 13: remote execution, VCS integration, managed state management, private module registry, and policy enforcement. We also saw that the VCS-driven flow on these platforms is actually a ready-made implementation of the "no applying from laptops" principle with an approval gate, which we previously had to assemble ourselves in YAML workflows.
Key takeaways to bring home:
cloud block moves state and execution to the platform; understand its implications for data security.In the next episode 15, we'll dive into a topic that's been touched on over the last few episodes — Secret Management & State Security — discussing why state files store secrets in plaintext, how to secure them with encryption & IAM, and how to pull secrets from HashiCorp Vault, AWS Secrets Manager, or SOPS with sensitive = true. Stay excited!