---
title: "Compatibility Testing Pulumi HCL"
url: https://daily.dev/posts/compatibility-testing-pulumi-hcl-iw6hlaaoz
source_url: https://www.pulumi.com/blog/compatibility-testing-pulumi-hcl
type: article
source: "Pulumi"
published: 2026-08-14T22:31:43.138Z
updated: 2026-08-14T22:39:56.481Z
tags: ["testing", "terraform", "iac", "pulumi", "opentofu"]
reading_time: 6
upvotes: 12
comments: 1
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Compatibility Testing Pulumi HCL

**[Pulumi](https://daily.dev/sources/pulumi)** · 6 min read · 12 upvotes · 1 comments

## Summary

Pulumi describes how its Pulumi HCL runtime is compatibility-tested against OpenTofu, built on the premise that any program valid for tofu apply must behave identically under pulumi up. The tfcompat test framework runs equivalent Terraform and Pulumi programs in parallel, recording each provider's gRPC calls and comparing outputs to define correctness as producing identical provider steps. The team also describes using LLM sub-agents (Claude, Codex) to autonomously hunt for compatibility bugs, since tests only need to encode a scenario rather than expected behavior, making false positives rare and enabling scaled, automated bug discovery via draft PRs.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.pulumi.com/blog/compatibility-testing-pulumi-hcl>

## Questions this post answers

### How does Pulumi verify that Pulumi HCL behaves the same as OpenTofu's tofu apply?

Pulumi uses a test framework called tfcompat that runs the same HCL program through both pulumi up/preview and tofu apply/plan against in-memory Terraform providers, recording every provider gRPC call and stack output. A test passes only if both tools call identical provider RPCs and produce identical outputs, defining correctness as matching provider steps rather than matching an expected behavior written by the test author.

_daily.dev surfaces engineering deep dives like this for teams comparing IaC tool compatibility strategies._

### How can LLM agents be used to find bugs in a compatibility test suite without producing false positives?

Because tfcompat tests only require specifying a scenario (the HCL files and providers used) rather than the expected correct behavior, an LLM cannot easily fabricate a false failure since the pass/fail criteria is defined by comparing Pulumi's and OpenTofu's actual provider calls, not a hardcoded expectation. Pulumi runs prompts instructing Claude or Codex sub-agents to find and prove bugs by writing new failing tfcompat tests, then opening draft PRs for each real divergence found.

_developers exploring agentic testing workflows can track emerging LLM bug-hunting patterns on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@agustinbarrientos** · 0 upvotes

> Does `tfcompat` compare cleanup after a partial apply and catch resources left behind?

## Similar posts on daily.dev

- [Pulumi Adds Native Support for Terraform and HCL](https://daily.dev/posts/pulumi-adds-native-support-for-terraform-and-hcl-brdxttnxj) · InfoQ · 1 upvotes · 0 comments
- [Pulumi for All Your IaC — Including Terraform and HCL](https://daily.dev/posts/pulumi-for-all-your-iac-including-terraform-and-hcl-j8bc6pdn6) · Pulumi · 2 upvotes · 0 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#terraform](https://daily.dev/tags/terraform), [#iac](https://daily.dev/tags/iac), [#pulumi](https://daily.dev/tags/pulumi), [#opentofu](https://daily.dev/tags/opentofu)

[View this post on daily.dev](https://daily.dev/posts/compatibility-testing-pulumi-hcl-iw6hlaaoz)
