generate-iac

Generate compliant IaC templates for Terraform, CDK TypeScript, CloudFormation YAML, and CDKTF.

43|13|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/aws-samples/sample-agentic-value-accelerator --skill generate-iac
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-iac
Source: https://github.com/aws-samples/sample-agentic-value-accelerator/tree/main/platform/control_plane/service_approval/plugin/.claude-plugin/skills/generate-iac
Command: npx skills add https://github.com/aws-samples/sample-agentic-value-accelerator --skill generate-iac

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mapping-results.json, validated.json, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the generation of compliant infrastructure-as-code (IaC) templates for Terraform, CDK TypeScript, CloudFormation YAML, and CDK for Terraform. It saves developers time and ensures consistent template quality across all four formats.

Core Features & Use Cases

  • Generate IaC in Four Formats: Outputs compliant templates for Terraform, CDK TypeScript, CloudFormation YAML, and CDK for Terraform.
  • Parameter Coverage Matrix: Ensures that every parameter defined for each control is covered by the templates.
  • Cross-generator Consistency: Enforces rules to maintain consistency across different formats.
  • Quality Rules Enforcement: Ensures the correct inclusion of parameters, property names, and resource policies.
  • Control ID Annotations: Tags each resource property with the associated control ID.
  • Schema Gap Handling: Identifies and handles parameters that are missing from the Terraform provider schema.
  • Modular Terraform Architecture: Structures Terraform modules with a clear directory structure.
  • CDK TypeScript and CDK for Terraform Layout: Specifies the layout and file requirements for the CDK implementations.

Quick Start

To generate compliant IaC templates, first map the controls to parameters using the 04-map sub-skill, then validate them using the 03-validate sub-skill. Use the generate-iac skill to generate the IaC templates and follow the instructions provided in the SKILL.md file for deployment.

Frequently Asked Questions about generate-iac

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

FAQPage Schema
How do I automate compliant infrastructure-as-code generation across multiple IaC frameworks?

Automating compliant infrastructure-as-code generation requires mapping control parameters to templates and validating them. This skill outputs compliant templates for Terraform, CDK TypeScript, CloudFormation YAML, and CDK for Terraform, ensuring consistent quality and parameter coverage across all four formats.

How do I generate Terraform modules that map directly to compliance controls?

Generating Terraform modules with compliance annotations involves structuring modular directories and tagging resource properties with associated control IDs. The skill creates modular Terraform architectures and enforces quality rules to ensure correct parameter inclusion and resource policy assignment.

What input files are required to generate CloudFormation YAML and CDK TypeScript templates?

Generating CloudFormation YAML and CDK TypeScript templates requires validated input files from mapping and validation steps. You must first map controls to parameters and validate them, using the resulting JSON files as dependencies to ensure compliant template generation.

Does this infrastructure automation approach handle missing parameters in the Terraform provider schema?

Handling missing parameters in the Terraform provider schema is supported through schema gap handling. The skill identifies parameters missing from the provider schema and manages them, while maintaining cross-generator consistency across Terraform, CloudFormation YAML, and CDK formats.

What is the best way to ensure cross-generator consistency when creating CDK for Terraform and CloudFormation templates?

Ensuring cross-generator consistency for CDK for Terraform and CloudFormation requires enforcing rules that maintain uniform parameter coverage and property names. The skill automates this by applying quality rules and specifying layout and file requirements for all CDK implementations.

Why are my generated infrastructure-as-code templates missing required compliance control annotations?

Missing compliance control annotations in generated infrastructure-as-code templates usually indicates incomplete parameter coverage. The skill prevents this by using a parameter coverage matrix to ensure every defined parameter is covered and tags each resource property with its associated control ID.