OpenTofu is an open-source infrastructure as code tool that uses HCL (HashiCorp Configuration Language) to declaratively manage cloud infrastructure. It is a community-driven fork of Terraform, fully compatible with existing Terraform providers and modules, with exclusive features like native state encryption. Pulumi provides an alternative IaC approach using general-purpose languages (TypeScript, Python, Go) inst...
When to use: Managing cloud infrastructure declaratively, provisioning multi-cloud resources, enforcing infrastructure consistency across environments, encrypting state at rest (OpenTofu), using familiar programming languages for IaC (Pulumi).
When NOT to use: One-off scripts better suited to CLI tools, application-level configuration management (use Ansible/Chef), container orchestration logic (use Kubernetes manifests), simple static hosting (use platform-native tools).
OpenTofu (オープンソースの Terraform フォーク) と Pulumi を使用したコードとしてのインフラストラクチャ。 OpenTofu HCL 構文、プロバイダー、リソース、データ ソース、モジュール、リモート バックエンドによる状態管理、ワークスペース、既存のインフラストラクチャのインポート、ワークフローの計画/適用、変数管理、出力値、プロビジョナー、および状態暗号化 (OpenTofu 限定) をカバーします。 Pulumi TypeScript/Python SDK、スタック管理、コンポーネント リソース、構成/シークレット、状態バックエンド、コードとしてのポリシー、自動化 API が含まれます。マルチ環境セットアップ、モジュール構成、CI/CD 統合、ドリフト検出、およびシークレット管理の一般的なパターン。 HCL 構成の作成またはレビュー、クラウド インフラストラクチャの状態の管理、Terraform から OpenTofu への移行、TypeScript または Python での Pulumi プログラムの構築、マルチ環境 IaC パイプラインのセットアップ、または状態暗号化の実装を行うときに使用します。 ソース: oakoss/agent-skills。