Lightlines
By hashicorp

refactor-module

hashicorp6k installs

Turn monolithic Terraform into reusable modules.

What it does

Refactors existing Terraform configurations into reusable modules with tests and a state-migration path.

When to use it

Use when transforming a monolithic Terraform configuration into reusable, maintainable modules.

How to use it

Give it an existing Terraform project, a module name, and a state-preservation choice; it refactors the configuration in the project.

What you provide

  • the source directory
  • the new module name
  • whether to preserve state
  • An existing project

Uses

Latest review

What you need · 2

The Terraform CLI must be available to inspect current state for migration planning.

The workflow directs the agent to use terraform-test for the testing step.


Access · 2

This skill

real infrastructure

Write

Creates real test infrastructure

current Terraform state

Write

Moves Terraform state addresses