terraform-module-library

Create reusable Terraform modules for AWS, Azure, and GCP infrastructure.

1|1|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/anyscale/terraform-provider-anyscale --skill terraform-module-library-anyscale
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: terraform-module-library
Source: https://github.com/anyscale/terraform-provider-anyscale/tree/main/.claude/skills/terraform-module-library
Command: npx skills add https://github.com/anyscale/terraform-provider-anyscale --skill terraform-module-library-anyscale

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing cloud infrastructure from scratch for every project leads to inconsistent, hard-to-maintain Terraform code. This Skill provides standardized module patterns so teams can build reusable, well-documented infrastructure components across AWS, Azure, and GCP. ## Core Features & Use Cases - Standard Module Structure: Enforces the conventional layout with main.tf, variables.tf, outputs.tf, versions.tf, examples, and tests. - Multi-Cloud Patterns: Covers AWS modules (VPC, EKS, RDS, S3, ALB, Lambda), Azure modules (VNet, AKS, Storage), and GCP modules (VPC, GKE, Cloud SQL). - Best Practices Built In: Input validation blocks, consistent tagging, provider version pinning, conditional resources with count/for_each, and Terratest-based testing. - Use Case: A platform engineer needs a production VPC with private subnets across three availability zones. The Skill provides a complete VPC module with validated CIDR inputs, tagged resources, and composable outputs that downstream modules like RDS can consume. ## Quick Start Ask the assistant to create a reusable Terraform VPC module for AWS with private subnets, input validation, and usage examples.

Frequently Asked Questions about terraform-module-library

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

FAQPage Schema
How do I create a reusable Terraform module for AWS?▼

Structure the module with main.tf for resources, variables.tf for inputs with validation blocks, outputs.tf for exported attributes, and versions.tf for provider pinning. Add an examples/ directory showing complete usage and tests/ with Terratest files to verify the module works.

What is the standard Terraform module structure?▼

A standard module contains main.tf, variables.tf, outputs.tf, versions.tf, a README.md, an examples/ directory with a complete usage example, and a tests/ directory. This layout makes modules composable, documented, and testable across teams.

How do I test Terraform modules with Terratest?▼

Write a Go test using the terratest terraform package that points TerraformDir at your examples/complete directory, then run InitAndApply and assert on outputs like vpc_id. Always defer terraform.Destroy to clean up resources after the test finishes.

Can one Terraform module pattern work across AWS, Azure, and GCP?▼

The module structure and best practices are consistent across providers, but resources are provider-specific. This Skill organizes modules per cloud (aws/, azure/, gcp/) with equivalent patterns like VPC/VNet, EKS/AKS/GKE, and RDS/Cloud SQL.

How do I validate Terraform variable inputs?▼

Use validation blocks inside variable definitions with condition expressions and error_message strings. For example, a CIDR block variable can be checked with a regex to ensure valid IPv4 CIDR notation before any resources are created.