code-generation

Generate Terraform code from parameterized templates for existing projects.

Updated Jan 20, 2026
One-click install
npx skills add https://github.com/poc-micro-frontends/terraform-infrastructure --skill code-generation-poc-micro-frontends
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-generation
Source: https://github.com/poc-micro-frontends/terraform-infrastructure/tree/main/skills/code-generation
Command: npx skills add https://github.com/poc-micro-frontends/terraform-infrastructure --skill code-generation-poc-micro-frontends

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Generate Terraform code from parameterized templates to add capabilities to existing projects, reducing manual coding when expanding infrastructure.

Core Features & Use Cases

  • Parameter-driven code generation from templates
  • Deterministic rendering with placeholders ${variable} and parameter substitution
  • Use cases: adding new components like RDS, SQS, or Cognito to existing environments

Quick Start

Pass a JSON payload with the template name and parameters to the generate script to render Terraform code.

Frequently Asked Questions about code-generation

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

FAQPage Schema
How do I generate Terraform code from templates to add infrastructure components?

To generate Terraform code, pass a JSON payload with the template name and parameters to a Node.js runner. The runner substitutes ${variable} placeholders with your provided values to render the final infrastructure configuration.

What is the best way to rapidly compose Terraform modules like RDS or VPCs for existing projects?

The best way to rapidly compose Terraform modules is using parameterized templates. This approach allows deterministic rendering by substituting blueprint variables, reducing manual coding when expanding infrastructure environments.

Can I use this code generation method to add SQS or Cognito to my current infrastructure?

Yes, you can use this code generation method to add SQS, Cognito, RDS, or Lambda components. It applies parameterized template substitution to existing projects, enabling fast and deterministic infrastructure-as-code expansion.

How does parameter substitution work in infrastructure-as-code templates?

Parameter substitution works by matching ${var} placeholders in template files against a JSON payload. The Node.js runner replaces these blueprint variables with provided parameter values to produce deterministic Terraform code.

Do I need Node.js to run these Terraform templates?

Yes, you need Node.js to execute the generation script. The runner processes your JSON payload, reads the template files, and substitutes the variables to output the rendered Terraform code.

What are the limitations of using template-driven code generation for Terraform?

A limitation of template-driven code generation is that it relies on predefined templates and ${variable} placeholders. If your required infrastructure configuration lacks a corresponding template file, you cannot generate it without creating a new one.