<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/compatibility-testing-pulumi-hcl-iw6hlaaoz" -->

---
title: Compatibility Testing Pulumi HCL | daily.dev
description: 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...
canonical: https://daily.dev/posts/compatibility-testing-pulumi-hcl-iw6hlaaoz
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Compatibility Testing Pulumi HCL | daily.dev
og:description: 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...
og:url: https://daily.dev/posts/compatibility-testing-pulumi-hcl-iw6hlaaoz
og:image: https://api.daily.dev/og/posts/iw6hLAaOZ.png
og:image:alt: Compatibility Testing Pulumi HCL
og:image:width: 1200
og:image:height: 630
og:locale: 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 for a given Terraform program?

Pulumi's tfcompat framework runs the same HCL program through both tofu and pulumi (via its dynamic Terraform-provider bridge), recording every provider gRPC call (ConfigureProvider, PlanResourceChange, ApplyResourceChange) and the final stack outputs for each run. A test passes only if both runs invoked identical provider operations and produced matching outputs, defining correctness as matching provider-visible behavior rather than a predefined expected result.

_Engineers building compatibility layers can compare testing approaches like this one on daily.dev._

### How can LLMs be used to find bugs in a compiler or interpreter without producing lots of false positives?

Constrain the LLM to prove each bug with a genuine failing test rather than asserting what correct behavior should be. In Pulumi's tfcompat setup, agents like Claude or Codex are prompted to find scenarios where Pulumi HCL and OpenTofu diverge on provider calls, then submit each as a draft PR with only the failing test added, since the test itself defines correctness by comparison rather than by a hardcoded expectation.

_Developers exploring agentic bug-hunting workflows track approaches like this 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
- [How to Migrate From Terraform to OpenTofu](https://daily.dev/posts/how-to-migrate-from-terraform-to-opentofu-xqekayb66) · Spacelift · 3 upvotes · 0 comments
- [How to Test Infrastructure as Code](https://daily.dev/posts/how-to-test-infrastructure-as-code-nn8f8zyii) · Pulumi · 0 upvotes · 0 comments
- [IaC Testing for DevOps: Types, Tools & Examples](https://daily.dev/posts/iac-testing-for-devops-types-tools-examples-wt3io8o20) · Spacelift · 1 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)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Compatibility Testing Pulumi HCL","url":"https://daily.dev/posts/compatibility-testing-pulumi-hcl-iw6hlaaoz","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/compatibility-testing-pulumi-hcl-iw6hlaaoz"},"datePublished":"2026-08-14T22:31:43.138Z","dateModified":"2026-09-13T20:09:06.636Z","description":"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...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/23d5ed1a18c0adfd867f2e22e69162f8?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/23d5ed1a18c0adfd867f2e22e69162f8?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Pulumi","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Pulumi","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/9792c211dccf434c8b469efac5b7b2ec","url":"https://daily.dev/sources/pulumi"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/compatibility-testing-pulumi-hcl-iw6hlaaoz","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":12},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"testing,terraform,iac,pulumi,opentofu","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Pulumi","item":"https://daily.dev/sources/pulumi"},{"@type":"ListItem","position":3,"name":"Compatibility Testing Pulumi HCL"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/compatibility-testing-pulumi-hcl-iw6hlaaoz","comment":[{"@type":"Comment","text":"Does tfcompat compare cleanup after a partial apply and catch resources left behind?","datePublished":"2026-08-15T18:07:20.508Z","url":"https://daily.dev/posts/iw6hLAaOZ#c-EsHpW0Ln9","author":{"@type":"Person","name":"Agustin Barrientos","url":"https://daily.dev/agustinbarrientos","image":"https://media.daily.dev/image/upload/s--5ayxQnqn--/f_auto/v1788281802/avatars/avatar_wQYYVe5Tbj0NJ7C7qPoa8?_a=BAMAMicg0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/compatibility-testing-pulumi-hcl-iw6hlaaoz#faq","mainEntity":[{"@type":"Question","name":"How does Pulumi verify that Pulumi HCL behaves the same as OpenTofu for a given Terraform program?","acceptedAnswer":{"@type":"Answer","text":"Pulumi's tfcompat framework runs the same HCL program through both tofu and pulumi (via its dynamic Terraform-provider bridge), recording every provider gRPC call (ConfigureProvider, PlanResourceChange, ApplyResourceChange) and the final stack outputs for each run. A test passes only if both runs invoked identical provider operations and produced matching outputs, defining correctness as matching provider-visible behavior rather than a predefined expected result. Engineers building compatibility layers can compare testing approaches like this one on daily.dev."}},{"@type":"Question","name":"How can LLMs be used to find bugs in a compiler or interpreter without producing lots of false positives?","acceptedAnswer":{"@type":"Answer","text":"Constrain the LLM to prove each bug with a genuine failing test rather than asserting what correct behavior should be. In Pulumi's tfcompat setup, agents like Claude or Codex are prompted to find scenarios where Pulumi HCL and OpenTofu diverge on provider calls, then submit each as a draft PR with only the failing test added, since the test itself defines correctness by comparison rather than by a hardcoded expectation. Developers exploring agentic bug-hunting workflows track approaches like this on daily.dev."}}]}
```

