Migration

Von Terraform zu Pulumi migrieren

Lizenz und Bedingungen

Terraform
Other, Quelltext verfügbar
Pulumi
Apache-2.0, Open Source
Ersatzgrad
Vollwertiger Ersatz Infrastructure in general-purpose languages instead of HCL.

Diese Seite ist auf Englisch verfasst.

Compatibility

Pulumi’s guide offers routes that keep your HCL as well as routes that convert it:

Before you switch

To convert the code yourself:

  1. Run pulumi convert --from terraform --language <typescript|python|go|csharp> in the folder holding the HCL. Variables, outputs, resources, data sources and modules (as Pulumi components) are supported, along with almost all HCL2 expressions.
  2. Import the existing resources with pulumi import --from terraform ./terraform.tfstate. Imported resources are marked protected. If you stay on runtime: hcl, use pulumi import --from hcl terraform.tfstate from the project directory instead.
  3. Run pulumi preview and expect no changes before the first pulumi up.

The guide also describes a state-first route with the pulumi-terraform-migrate plugin (pulumi plugin run terraform-migrate -- stack --from ... --to ... --out ... --plugins ...), which writes a Pulumi state file and a list of required plugins, followed by pulumi stack import. It has to be repeated for each Terraform stack. Pulumi’s recommended route is Neo, its hosted agent, which needs Pulumi Neo access, the Pulumi GitHub app and cloud credentials in Pulumi ESC.

Pitfalls

Offizielle Anleitung

Migrationsanleitung von Pulumi ↗

Geprüft am 2026-10-06.

Quellen

Weitere Alternativen zu Terraform →