askill
terraform-generator

terraform-generatorSafety 82Repository

Generate production-ready Terraform configurations (HCL files) following current standards. Use when creating new Terraform resources, building infrastructure as code, or implementing cloud infrastructure.

0 stars
1.2k downloads
Updated 3/19/2026

Package Files

Loading files...
SKILL.md

Terraform Generator

Overview

This skill generates production-ready Terraform configurations following best practices and current standards. Automatically integrates validation and documentation lookup for custom providers and modules.

When to Use

Use this skill when:

  • Creating new Terraform resources
  • Building infrastructure as code
  • Implementing cloud infrastructure (AWS, Azure, GCP)
  • Generating Terraform modules
  • Converting existing infrastructure to Terraform

Core Capabilities

  1. Generate Terraform Configurations: Create main.tf, variables.tf, outputs.tf, versions.tf
  2. Provider Documentation Lookup: Use Context7 MCP for up-to-date provider docs
  3. Best Practices Enforcement: Follow Terraform conventions and security standards
  4. Data Sources: Include data sources for dynamic values (region, account, AMIs)
  5. Lifecycle Rules: Add lifecycle rules for critical resources
  6. Validation Integration: Automatically validate with terraform-validator skill

Critical Requirements

  1. Understand requirements (providers, resources, modules)
  2. Check for custom providers/modules and lookup documentation
  3. Consult reference files before generation
  4. Generate Terraform files with ALL best practices
  5. Include data sources for dynamic values
  6. Add lifecycle rules on critical resources
  7. Invoke terraform-validator skill for validation
  8. Fix all validation/security failures and re-validate
  9. Provide usage instructions

Usage Examples

Example: Generate S3 Bucket

User: "Create Terraform for an S3 bucket with versioning"

Output:

  • main.tf with S3 bucket resource
  • variables.tf with bucket_name variable
  • outputs.tf with bucket_arn output
  • versions.tf with provider constraints

Example: Generate EC2 Instance

User: "Generate Terraform for an EC2 instance"

Output:

  • Complete EC2 configuration
  • Data source for AMI
  • Security group configuration
  • Proper tagging

Best Practices

  • Use FQCN for all modules
  • Include data sources for dynamic values
  • Add lifecycle rules for critical resources
  • Pin provider versions
  • Use variables for configurable values
  • Include comprehensive outputs

Validation

IMPORTANT: After generating Terraform configurations, ALWAYS validate using:

/skills terraform-validator

References

  • Terraform Best Practices
  • Provider Examples

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

76/100Analyzed 3/29/2026

Well-structured Terraform skill with clear metadata, trigger phrases, and 9-step critical requirements process. Offers good reusability across cloud providers (AWS, Azure, GCP) and includes terraform-validator integration. Missing deeper technical details like specific HCL syntax examples and error handling, but provides solid reference-style guidance for generating production-ready infrastructure code.

82
80
78
62
72

Metadata

Licenseunknown
Version1.0.0
Updated3/19/2026
PublisherFiredMosquito831

Tags

security