# Emulating Terraform on Pulumi's Engine

DevFeed: [Emulating Terraform on Pulumi's Engine](<https://devfeed.tech/articles/emulating-terraform-on-pulumi-s-engine-19032.md>)

Original publisher: [Read original article](<https://www.pulumi.com/blog/terraforms-data-model-on-pulumis-engine/>)

Author: Ian Wahbe

Published: 2026-08-04T00:00:00Z

Content type: article

Language: en

Sources: [Pulumi](<https://devfeed.tech/sources/pulumi.md>)

Topics: [Terraform](<https://devfeed.tech/topics/terraform.md>), [opentofu](<https://devfeed.tech/topics/opentofu.md>), [terraform provider](<https://devfeed.tech/topics/terraform-provider.md>), [configuration](<https://devfeed.tech/topics/configuration.md>)

Tags: [engineering](<https://devfeed.tech/tags/engineering.md>), [hcl](<https://devfeed.tech/tags/hcl.md>), [modules](<https://devfeed.tech/tags/modules.md>), [opentofu](<https://devfeed.tech/tags/opentofu.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [providers](<https://devfeed.tech/tags/providers.md>), [pulumi](<https://devfeed.tech/tags/pulumi.md>), [terraform](<https://devfeed.tech/tags/terraform.md>), [terraform-provider](<https://devfeed.tech/tags/terraform-provider.md>), [translation](<https://devfeed.tech/tags/translation.md>)

## AI overview

This article explains how Pulumi's HCL interpreter maps Terraform configuration, resources, providers, and modules onto the Pulumi engine. It reports that the implementation works with 96% of Pulumi's top Terraform modules and describes how Pulumi's terraform-provider relays between Pulumi and Terraform provider protocols.

## Source excerpt

The core promise of Pulumi's HCL support is that you can bring your existing Terraform configuration and modules, and pulumi will run them. If it works in OpenTofu and doesn't work in Pulumi, we would like to fix that. Given that goal, our HCL interpreter needs to take HCL as input and emit instructions to the Pulumi engine that semantically match how tofu would interpret the same input. This is made harder by the fact that Pulumi and OpenTofu have fundamentally different engine semantics and provider ecosystems. This blog post will explore how we have implemented that mapping well enough to get 96%1 of our top Terraform modules working on Pulumi. We'll briefly walk through how Pulumi's HCL interpreter handles Terraform's resource semantics, providers, and modules. It will also call out where Pulumi's HCL support lets you do things that Terraform and OpenTofu will not allow. Providers Both Pulumi and Terraform have providers, but they don't have the same providers. While there are providers that Terraform does not have, Pulumi can always resolve a Terraform provider using Pulumi's confusingly named terraform-provider provider.2 This is the same provider that lets you consume Any Terraform Provider in another Pulumi program with pulumi package add terraform-provider .... The terraform-provider provider acts as a relay: it speaks Pulumi's protocol to the Pulumi engine, and speaks Terraform's provider protocol to the Terraform provider it stands up. Because Pulumi HCL needs to work with all Pulumi providers and because terraform-provider lets Pulumi HCL speak to Terraform providers via the Pulumi protocol, Pulumi HCL actually only speaks Pulumi protocols directly: flowchart LR subgraph n2Entry[" "] n2["terraform-provider"] end subgraph providerBox["Pulumi Provider"] direction TD n2Entry n3["Terraform Provider"] end n0["Pulumi HCL"] <--> n1["Pulumi Engine"] n1 <--> n2Entry n2 <--> n3 n2@{ shape: rect} n3@{ shape: rect} n0@{ shape: rect} n1@{ shape: rect} style n2Entry f