One Runner per IaC Framework: Separating Terraform, OpenTofu, Pulumi, Bicep and CloudFormation

By Chirag Panchal · Founder & Lead Architect · · 7 min read

A runner is one program that starts the IaC tool in a disposable container of that engine's own pinned image. A single setting tells each runner which engines it serves, so each framework's work can sit on its own host, network and credentials. How runs and validation tasks are routed, how to roll it out without stranding work, and why the Pulumi runner is the one you most want isolated.

Development Status & Architectural Evolution: InfraOrcinus is in active development. Architecture specifications, internal interfaces, and operational protocols described herein reflect our current engineering design and are continuously refined to make InfraOrcinus robust, resilient, and enterprise-grade.

A platform that runs five IaC frameworks has five different trust questions. Terraform and OpenTofu execute providers. Azure Bicep and AWS CloudFormation hand a template to a cloud's own service. Pulumi runs the blueprint author's own program: arbitrary code, in a general-purpose language, on your runner.

A single runner pool that does all of it has one answer to all five questions, and it is the most permissive one. This article describes the setting that lets you give each framework its own runner, and the reasoning for doing so.


1. What a Runner Is

A runner is one program that polls the control plane for work and executes it. It does not contain Terraform, Pulumi or the Azure CLI. For each step it starts a disposable container from the engine's own pinned image: the Terraform image, the OpenTofu image, a Pulumi image for the program's language, the Azure CLI image for Bicep, the AWS CLI image for CloudFormation. So the tool's version and libraries always match the framework, nothing is installed on the runner host, and each step's container is gone when it ends.

One consequence is worth stating plainly: the runner needs access to the container engine's socket in order to start those containers, and that access is equivalent to root on the host. Put runners on dedicated hosts, and keep cloud credentials only where they are needed.


2. Telling a Runner What It Serves

By default a runner serves every engine, exactly as before. To split the work, set one environment variable on each runner:

Variable Meaning
RUNNER_ENGINES A comma list of terraform, opentofu, pulumi, bicep, cloudformation. Empty (the default) serves every engine. An unknown name stops the runner at start-up, so a typo cannot silently leave work unserved.
RUNNER_VALIDATION_POOLS Optional. Overrides the validation pools derived from RUNNER_ENGINES.
BLUEPRINT_ENGINE_POOLS On the server. When true, blueprint validation also goes to the framework's own runner. Off by default.

A ready-made Compose file starts one runner per framework, each the same program with a different RUNNER_ENGINES.


3. How Work Is Routed

Every new run is stamped with its environment's engine when it is created. A runner's poll names the engines it serves, and the server hands it only matching runs, oldest first. A Terraform run is never offered to the Pulumi runner, and the reverse. Pipeline steps and console requests are not engine-specific, so any runner serves them.

Two compatibility rules keep upgrades safe:

  • Runs queued before the upgrade have no engine. They are taken by any runner that serves terraform, so nothing is stranded.
  • A runner that predates pools sends no pool list and is only ever offered the default validation work, so an old runner can never be handed a program to execute.

4. Why Pulumi Gets Special Treatment

Validating a Terraform blueprint parses it. Validating a Pulumi blueprint can mean running it, because the only way to know what a program does is to run it. The dry run that checks AI-drafted and edited Pulumi programs executes the program in a throwaway container, with a throwaway local state backend, no real credentials, the hardened runner container (no capabilities, non-root, read-only filesystem, resource limits), and its own pool.

Pools are how that execution is kept apart. Tasks carry a pool name: default for terraform validate, az bicep build and linters, and pulumi-preview for the Pulumi dry run. A Pulumi-only runner serves only Pulumi runs and the preview pool, so a runner with RUNNER_ENGINES=pulumi, in its own network segment and no cloud credentials, is the isolated setup: the place where untrusted-ish code runs is nowhere near anything worth stealing.

If no runner serves the preview pool, the check says so within seconds and is skipped instead of waiting out a timeout.


5. Rolling It Out Without Stranding Work

The order matters, and each step is safe on its own:

  1. Start the engine runners, or add RUNNER_ENGINES to existing ones. Runners with no setting keep serving everything, so nothing changes yet.
  2. Stop any all-engine runner you no longer want. Work now flows only to the specialized ones.
  3. Only then set BLUEPRINT_ENGINE_POOLS=true, once every runner is on a build that announces engine pools.

If an engine has no runner, its runs wait in the queue until one connects, and its blueprint validation is skipped, not failed. That is a deliberate fail-safe against marking a good draft bad because the right runner was down, and the reason to watch queue depth per engine.


6. What You Get

  • Blast radius by framework. A compromised Pulumi program cannot reach the credentials a CloudFormation runner holds, because they are on different hosts.
  • Credentials only where needed. The Bicep runner holds Azure credentials; the CloudFormation runner holds AWS credentials; neither holds the other's.
  • Capacity per framework. Scale the runners for the engine that is busy.
  • A clean audit story. "Pulumi programs only ever execute on host X, with no cloud credentials" is a sentence you can verify.

The cost is more runners to operate. For a small team, one all-engine runner is a perfectly reasonable place to start; split when the trust difference between frameworks starts to matter.


Summary

A runner starts each IaC tool in a disposable container of that engine's own pinned image, and RUNNER_ENGINES decides which frameworks it serves. Runs are stamped with their engine and routed to matching runners, validation uses pools, and the Pulumi dry run, which executes a program, gets a pool of its own so it can live on a runner with no credentials. Roll out the runners first, retire the all-engine runner next, and enable engine-specific validation last.