移行

Terraform から Pulumi への移行

ライセンスと利用条件

Terraform
Other, ソースアベイラブル
Pulumi
Apache-2.0, オープンソース
置き換えの度合い
完全な置き換え Infrastructure in general-purpose languages instead of HCL.

このページは英語で書かれています。

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

公式ガイド

Pulumiの移行ガイド ↗

2026-10-06にレビュー済み。

出典

Terraformのその他の代替 →