tg-migrate-analyse

Analyzes legacy Terraform repositories and produces a structured Terragrunt migration plan.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Migrating a legacy Terraform repository to Terragrunt requires understanding modules, variables, cross-stack dependencies, and CI/CD configuration before any code is written. This Skill automates Phase 1 of that migration by parsing the repo and producing a structured, reviewable migration plan. ## Core Features & Use Cases - Full Repo Analysis: Runs structure, module, variable, and cross-stack dependency analysers in one pass over the legacy Terraform repo. - GitLab CI/CD Variable Mapping: Fetches project, subgroup, and group-level GitLab variables and maps them to future get_env() calls and tfvar templates. - Structured Migration Plan: Outputs service decomposition, environment scope across 13 standard environments, secret mappings, dependency blocks, and a risk assessment covering special cases like southcentralus/prod and is_secondary patterns. - Use Case: Point the Skill at a legacy Terraform repo, review the generated decomposition and risk assessment, then approve proceeding to Phase 2 scaffolding. ## Quick Start Run the tg-migrate-analyse skill with the path to your legacy Terraform repository to generate a migration plan for review.

Frequently Asked Questions about tg-migrate-analyse

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

FAQPage Schema
How do I plan a Terraform to Terragrunt migration?

Run the analysis phase against your legacy Terraform repo path. It parses structure, modules, variables, and cross-stack dependencies, then outputs a migration plan with service decomposition, environment scope, and risk assessment for your review.

How to map GitLab CI/CD variables to Terragrunt?

The analysis fetches GitLab CI/CD variables at project, subgroup, and group scope, then identifies which ones become get_env() calls in Terragrunt and maps secrets from CI/CD variable names to tfvar template names.

Does the migration analysis handle cross-stack dependencies?

Yes, it detects remote state references to other stacks and lists the required dependency blocks for the _envcommon configuration. These are reported in the cross-stack dependencies section of the plan.

What risks are flagged in a Terraform migration analysis?

The risk assessment covers southcentralus/prod special cases, is_secondary pattern requirements, and any non-standard patterns detected in the repo. It also notes which of the 13 standard environments are absent.

Can I adjust the migration plan before scaffolding?

Yes, the analysis stops at a checkpoint after presenting the plan. You can adjust the service decomposition or dependencies before approving progression to Phase 2 scaffolding.