Loading...
Loading...
Infrastructure as code with OpenTofu (open-source Terraform fork) and Pulumi. Covers OpenTofu HCL syntax, providers, resources, data sources, modules, state management with remote backends, workspaces, importing existing infrastructure, plan/apply workflow, variable management, output values, provisioners, and state encryption (OpenTofu-exclusive). Includes Pulumi TypeScript/Python SDKs, stack management, component resources, config/secrets, state backends, policy as code, and automation API. Common patterns for multi-environment setups, module composition, CI/CD integration, drift detection, and secret management. Use when writing or reviewing HCL configurations, managing cloud infrastructure state, migrating from Terraform to OpenTofu, building Pulumi programs in TypeScript or Python, setting up multi-environment IaC pipelines, or implementing state encryption.
npx skill4agent add oakoss/agent-skills opentofu| Pattern | Tool / Command | Key Points |
|---|---|---|
| Initialize project | | Downloads providers, initializes backend |
| Preview changes | | Shows diff without applying |
| Apply changes | | Provisions/updates resources |
| Destroy resources | | Tears down managed infrastructure |
| Import resource | | Brings existing resource under management |
| State encryption | | OpenTofu-exclusive, AES-GCM with key providers |
| Remote backend | | Store state in cloud storage with locking |
| Workspaces | | Isolated state per environment |
| Module usage | | Reusable infrastructure components |
| Output values | | Expose values for other configs or CI |
| Variable files | | Environment-specific variable overrides |
| Pulumi new project | | Scaffold TypeScript IaC project |
| Pulumi preview | | Shows planned changes |
| Pulumi deploy | | Provisions/updates resources |
| Pulumi config | | Stack-scoped configuration |
| Pulumi secrets | | Encrypted config values |
| Pulumi stacks | | Switch between environments |
| Automation API | | Programmatic stack management |
| Mistake | Correct Pattern |
|---|---|
| Storing state locally in team environments | Configure remote backend (S3, GCS, Azure Blob) with state locking |
| Hardcoding provider credentials in HCL | Use environment variables or provider-specific auth chains |
Using | Run |
| Editing state manually | Use |
Ignoring | Commit lock file for reproducible provider versions |
Using | Prefer |
| Sharing one workspace for all environments | Use separate workspaces or backend config per environment |
Putting secrets in | Use |
| Pulumi: creating resources outside component classes | Wrap related resources in ComponentResource for reuse |
| Pulumi: not awaiting async operations | Ensure all resource operations complete before stack export |
Skipping | Always plan and require approval before apply in pipelines |
Not using | Prefer full plans; |
ExploreTaskTaskIf theskill is available, delegate AWS resource patterns to it. If theamazon-web-servicesskill is available, delegate container infrastructure patterns to it. If thedockerskill is available, delegate CI/CD pipeline patterns to it.github-actions