tg-migrate-scaffold

Generates Terragrunt scaffold with placeholder values for legacy Terraform migration.

Updated Jul 22, 2026
One-click install
npx skills add https://github.com/Trigent-Software-Pvt-Ltd/trigen-aidlc --skill tg-migrate-scaffold-trigent-software-pvt-ltd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tg-migrate-scaffold
Source: https://github.com/Trigent-Software-Pvt-Ltd/trigen-aidlc/tree/main/plugins/terragrunt-migrate/skills/tg-migrate-scaffold
Command: npx skills add https://github.com/Trigent-Software-Pvt-Ltd/trigen-aidlc --skill tg-migrate-scaffold-trigent-software-pvt-ltd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Migrating legacy Terraform repositories to a Terragrunt structure requires manually creating root configs, environment directories, module conversions, and CI pipelines, which is error-prone and repetitive. ## Core Features & Use Cases - Scaffold Generation: Creates root.hcl, all environment directories, and per-service subdirectories with placeholder terragrunt.hcl files. - Module Conversion: Transforms legacy .tf code into single-file _modules/ with all variables defaulted and is_secondary patterns for DR regions. - Envcommon & Pipeline Generation: Builds _envcommon/*.hcl dependency chains with mock_outputs and a .gitlab-ci.yml covering all environments. - Use Case: After completing Phase 1 analysis of a legacy Terraform repo, run this phase to produce the full Terragrunt directory structure with PLACEHOLDER values ready for population in Phase 3. ## Quick Start Run the tg-migrate-scaffold skill with the legacy repo path and target repo path to generate the full Terragrunt scaffold after Phase 1 analysis is approved.

Frequently Asked Questions about tg-migrate-scaffold

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

FAQPage Schema
How do I migrate a legacy Terraform repo to Terragrunt?

Run the phased migration workflow: complete Phase 1 analysis first, then use this scaffold phase to generate root.hcl, environment directories, _modules/, _envcommon/, and .gitlab-ci.yml. All values use __PLACEHOLDER__ format until Phase 3 populates real values.

How to convert Terraform modules to Terragrunt single-file modules?

The migration_convert_modules step transforms legacy .tf code into a single main.tf per module under _modules/. Each module must have all variables defaulted and must not contain provider, backend, or version blocks.

What prerequisites are needed before generating a Terragrunt scaffold?

Phase 1 analysis must be complete and its state loadable via migration_get_state for the target path. The user must also have approved the migration plan before scaffolding begins.

Does the scaffold include real environment values?

No. All environments receive placeholder values in the format __PLACEHOLDER_{variable_name}__. Real values are populated later in Phase 3, one environment at a time.

How are service dependencies handled in Terragrunt _envcommon files?

The migration_generate_envcommon step creates _envcommon/*.hcl files with dependency chains from Phase 1 analysis and mock_outputs. Mock outputs allow init, validate, plan, import, show, and apply commands.