Snap CD vs Terragrunt

Terragrunt is the tool most people reach for first. It solves real problems: backend blocks repeated in every root, provider blocks copied alongside them, and no built-in way to run a set of root modules in the right order. Anyone who has used it knows how much copying it takes off your hands.

Snap CD covers some of the same ground and a good deal that Terragrunt doesn't: running deployments continuously rather than on demand, passing values between separate state files, approval gates, access control per team. What follows should help you work out which one fits, or whether you want bits of both.

Architecture

Almost every other difference below follows from this one.

Terragrunt

Terragrunt is a CLI tool. It runs wherever you invoke it: your laptop, a CI runner, a bastion host. No server, no record kept between runs, no web UI, no API. When the process exits, it's finished.

Snap CD

Snap CD is a Server and Runners. The Server holds the configuration, tracks what depends on what, watches your Git sources and stores the logs. Runners sit in your own infrastructure and run the Terraform commands. Every plan, apply and approval is kept.

In practice Terragrunt does one run at a time, and if you want deployments to happen on their own you build that in CI yourself. Snap CD watches for changes and runs the deployments across the whole graph, keeping a record as it goes.

Dependency management

Both tools pass outputs from one root module into another, by quite different routes.

Terragrunt

Terragrunt's dependency blocks read outputs directly from another module's state file:

# compute/terragrunt.hcl
dependency "networking" {
  config_path = "../networking"
}

inputs = {
  vpc_id             = dependency.networking.outputs.vpc_id
  private_subnet_ids = dependency.networking.outputs.private_subnet_ids
}

When you run terragrunt run-all apply, Terragrunt builds the dependency graph, applies modules in the correct order, and passes outputs between them.

That covers a lot of ground. Where it gets awkward:

  • State access: the machine running Terragrunt needs read access to every module's state backend. Running run-all across 20 modules spanning AWS, Azure and GCP puts a lot of credentials on one machine.
  • No change detection: Terragrunt doesn't know when outputs change. You run run-all and it re-plans everything, or you manually decide which modules to touch.
  • No cascading: if networking's outputs change, Terragrunt doesn't automatically trigger a re-plan of compute. You re-run run-all and hope the dependency ordering handles it.
  • Static wiring: dependency blocks are fixed references, so you can't fan them out with for_each or count. Cross-stack dependencies arrived in v1.1.0, but you still wire them by hand and nothing re-plans on its own when an upstream output changes.
  • One machine: the whole graph runs in a single process. On a big graph that gets slow, since module B waits for module A unless the two are unrelated.

Snap CD

Snap CD keeps the dependencies on the server, as snapcd_module_input_from_output resources:

resource "snapcd_module_input_from_output" "vpc_id" {
  module_id        = snapcd_module.compute.id
  input_kind       = "Param"
  name             = "vpc_id"
  output_module_id = snapcd_module.networking.id
  output_name      = "vpc_id"
}

The Server knows the whole graph. When networking's outputs change after an apply, compute gets queued for a re-plan. And each Runner only needs its own Module's state backend, not everybody's.

DRY configuration

Both tools get rid of the repetition. Terragrunt writes the files for you before Terraform runs; Snap CD sets the values once on the Namespace and hands them to every Module underneath.

Terragrunt

Terragrunt eliminates repetitive Terraform boilerplate:

# root terragrunt.hcl
remote_state {
  backend = "s3"
  config = {
    bucket         = "my-terraform-state"
    region         = "us-east-1"
    encrypt        = true
    dynamodb_table = "terraform-locks"
    key            = "${path_relative_to_include()}/terraform.tfstate"
  }
}

generate "provider" {
  path      = "provider.tf"
  if_exists = "overwrite"
  contents  = <<EOF
provider "aws" {
  region = "us-east-1"
}
EOF
}

Every child module inherits this configuration via include. No more copying backend blocks into 30 modules.

Snap CD

Snap CD declares the shared parts on the Namespace, and every Module in it inherits them.

A Namespace Extra File is written into every Module's root after checkout, which is how the backend block gets there without living in thirty repositories:

resource "snapcd_namespace_extra_file" "backend" {
  namespace_id = snapcd_namespace.networking.id
  file_name    = "extra_root.tf"
  contents     = <<-EOT
    terraform {
      backend "http" {}
    }
  EOT
}

A Namespace Input does the same for values. Set usage_mode = "UseByDefault" and every Module gets it; set UseIfSelected and each Module asks for it by name. An Input From Definition goes further and takes the value from the Module itself, so ModuleName and NamespaceName can build a state key per Module from one piece of configuration. Namespace-level flags, hooks and policies follow the same pattern.

Your Terraform doesn't get shorter either way. Each root still declares the variables it accepts, which is how anyone knows what to pass it. What you lose is the configuration you were only copying because Terraform insists on finding it in the root.

Where it happens is what differs. Terragrunt generates the files when you invoke it, from a second tree you keep alongside the first. Snap CD holds the values on the server and supplies them when the job runs, so there's no second tree to maintain, and the grouping that shares them is the same one carrying your dependencies, approvals and permissions. The longer guide on keeping DRY covers both tools properly.

Execution model

Terragrunt

run-all works through the graph in one process. Independent modules run in parallel, tunable with --parallelism, but it's all on one machine. Interrupt it and you start again from the top, since nothing is recorded along the way.

There's a deeper problem too. run-all doesn't know which modules in the selection have already been deployed and which haven't.

First-time deployments fail. When you run terragrunt run-all apply on a fresh stack, Terragrunt tries to resolve all dependency block outputs before any applies happen. If module B depends on module A's outputs and neither has been deployed, the dependency resolution fails - module A has no state yet, so there are no outputs to read. You get round it with mock_outputs, but then you're maintaining the mocks, and they hide real errors. (#2714, #1246)

Plans fail on fresh stacks for the same reason. terragrunt run-all plan resolves dependency outputs upfront. On a stack where not every module has been deployed, plans for downstream modules fail because upstream outputs don't exist yet. (#2907)

Partial failures leave you guessing. If run-all apply gets through A and C but fails on B, nothing records what succeeded. Run it again and everything applies again, including the parts that worked. Usually harmless, but it wastes time and can produce surprises if upstream state moved in between.

Partial teardowns are fragile. run-all destroy has the inverse problem: if some modules are destroyed and others fail, re-running doesn't reliably skip the already-destroyed ones. (#3183)

Snap CD

Snap CD spreads the work across Runners. The Server queues jobs, Runners pick them up, and the results are kept. If a Runner dies mid-apply the Server knows where it got to. Independent Modules run on different Runners without competing for the same machine.

The Server knows which Modules have been deployed, which have plans waiting and which are blocked on something upstream. First deployments, partial failures and teardown order aren't special cases when the orchestrator remembers what happened last time.

None of this matters much at five modules. At fifty, across several clouds, you notice.

Change detection and drift

Terragrunt

Terragrunt doesn't watch for changes or check for drift. You run terragrunt run-all plan when you want to know. In CI that usually means every commit, or on a timer.

Snap CD

Snap CD watches your Git sources. A commit on the branch a Module tracks starts a plan. An upstream Module's outputs changing re-plans whatever consumes them. No CI triggers to wire up, no cron jobs.

Drift checks run on a schedule you set per Module, and anything they find becomes a plan that goes through the usual approvals.

Approval gates

Terragrunt

Terragrunt has no approvals. If you want someone to sign off before an apply, you build it in CI: a manual gate in the pipeline, or a PR that triggers the apply when it merges.

Snap CD

Snap CD has approval thresholds built in. Require two approvals before an apply, set per Module or per Stack. Anyone holding Approver at the Module's level or above can give one, and every approval is recorded.

Access control

Terragrunt

Terragrunt has no users, roles or permissions. That's handled elsewhere, which in practice means whoever can run terragrunt apply on the machine has whatever that machine's credentials allow.

Snap CD

Snap CD has roles at every level: organisation, Stack, Namespace, Module and Runner. Somebody can be Contributor on test and Reader on prod. A service principal can approve on staging and have nothing at all on production. The same permissions apply in the web UI, the API and the Terraform provider.

Secrets

Terragrunt

Terragrunt doesn't support injecting secrets without writing them to disk. Sensitive values passed through inputs end up in .auto.tfvars files on the filesystem.

Snap CD

Snap CD stores secrets encrypted and hands them to the Runner as inputs and environment variables when the job runs. Nothing sensitive lands on disk in plaintext. Secrets belong to a Stack, Namespace or Module, and you attach them with snapcd_module_input_from_secret.

Learning curve

Terragrunt

Terragrunt has its own configuration language in terragrunt.hcl, with include, dependency, generate, inputs, locals and the rest. It's HCL, so it looks familiar, but it's a separate dialect that behaves in its own way. You'll need to learn how the inheritance works, what dependency mock outputs do, and the order run-all walks the graph in.

Snap CD

You configure Snap CD in the web UI or with its Terraform provider, which is ordinary Terraform resources. If you know Terraform you already know how to configure it.

Lock-in

Both do well here.

Terragrunt

Terragrunt wraps your Terraform without changing it. The .tf files are ordinary Terraform. Drop Terragrunt and you'll be putting backend blocks and provider configuration back into each module by hand, but the infrastructure code itself is untouched.

Snap CD

Snap CD stays out of the code the same way. There's nothing Snap CD-specific in your Terraform, and Runners run plain terraform plan and terraform apply. Leave and the code is fine as it is; you'll just need something else to run it in order.

Comparison table

Dimension Terragrunt Snap CD
Architecture Local CLI wrapper Server + distributed Runners
Dependencies dependency blocks, local state reads snapcd_module_input_from_output, server-side
DRY config include, generate, second tree Namespace inheritance: extra files, inputs, flags
Execution Single process, one machine Distributed across Runners
Cascading Manual (run-all) Automatic on output change
Change detection None (manual/CI) Continuous source monitoring
Drift detection None Scheduled per Module
Approval gates None (build in CI) Built-in with configurable thresholds
RBAC None Hierarchical, scoped to Stack/Namespace/Module
Secrets Written to disk as .auto.tfvars Encrypted, injected at runtime
Audit trail None (check CI logs) Persistent server-side history
Web UI None Dashboard with plan review
State access Runner needs access to all states Each Runner accesses only its own Module's state
Lock-in Low - standard Terraform code Low - standard Terraform code
Open source Yes (MIT) Runner is source-available; Server is SaaS or self-hosted
Learning curve terragrunt.hcl dialect Terraform provider or web UI

When to choose which

Terragrunt is a good fit when:

  • You want the repetition gone and nothing else, with no server to run.
  • Your dependency graph is small enough to run locally or in a single CI job.
  • You don't need persistent orchestration - running terragrunt run-all apply on demand or from CI is sufficient.
  • You want a free, open-source tool with no server infrastructure to manage.

Snap CD is a good fit when:

  • You need continuous, event-driven deployment - not just on-demand runs.
  • Your dependency graph spans multiple cloud providers or teams, and you need distributed execution.
  • You want approval gates, RBAC, and an audit trail without building them yourself.
  • You're scaling beyond what a single CI job can orchestrate.
  • You want automatic cascading: when one module's outputs change, dependents re-plan without manual intervention.

See also

Snap CD

Intelligent GitOps for Infrastructure as Code. Automate, orchestrate, and scale your infrastructure deployments with confidence.


© 2026 Snap CD. All rights reserved.

An unhandled error has occurred. Reload 🗙