opentofu-modules

Write OpenTofu modules and tests for homelab infrastructure.

24|3|Updated Mar 31, 2022
One-click install
npx skills add https://github.com/ionfury/homelab --skill opentofu-modules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opentofu-modules
Source: https://github.com/ionfury/homelab/tree/main/.claude/skills/opentofu-modules
Command: npx skills add https://github.com/ionfury/homelab --skill opentofu-modules

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

OpenTofu modules and testing workflows for homelab infrastructure. It standardizes how modules are authored, tested, and validated before deployment, reducing drift and errors in IaC.

Core Features & Use Cases

  • Provides a structured module layout under infrastructure/modules with clear inputs, resources, and outputs.
  • Includes test patterns and guidance for writing OpenTofu tests in infrastructure/modules/<name>/tests/ using tftest OpenTofu syntax.
  • Enables reproducible validation through task-based commands and version pinning to ensure consistent toolchain.

Quick Start

Install and run module tests using the defined task commands, starting with tg:fmt to format, then tg:test-<module> to execute tests in a CI-friendly manner.

Frequently Asked Questions about opentofu-modules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure OpenTofu modules and tests for homelab infrastructure?

OpenTofu modules belong in infrastructure/modules/ and their tests in infrastructure/modules/<name>/tests/. This layout standardizes module authoring and validation to reduce drift and errors in IaC deployments.

What is the best way to validate OpenTofu infrastructure changes before deployment?

Validating OpenTofu changes involves writing tests using tftest syntax within the module tests directory. You can then execute reproducible, CI-friendly validation through defined task commands.

How do I run OpenTofu module tests in a CI-friendly manner?

Running OpenTofu module tests in a CI-friendly manner uses defined task-based commands. Start with tg:fmt to format code, then execute tg:test-<module> to run the tests for a specific module.

Does this OpenTofu testing workflow support version pinning for toolchain consistency?

Yes, this OpenTofu testing workflow supports version pinning to ensure consistent toolchain execution. This enables reproducible validation of your homelab infrastructure modules across different environments.

Can I use tftest syntax to validate homelab IaC modules?

Yes, you can use tftest syntax to validate homelab IaC modules. The workflow provides test patterns and guidance for writing OpenTofu tests directly within the module directory structure.