
Terraform Module Library
Reuse hardened AWS and OCI Terraform module patterns (VPC, EKS, RDS, S3, ALB, Lambda, security groups) instead of inventing IaC from scratch.
Install
npx skills add https://github.com/wshobson/agents --skill terraform-module-libraryWhat is this skill?
- Seven AWS module families: VPC, EKS, RDS, S3, ALB, Lambda, and reusable security groups
- OCI VCN patterns with DRG, Internet/NAT/Service gateways, and routing
- Ten documented AWS Well-Architected-aligned practices including encryption, KMS, logging, and PrivateLink
- EKS module covers IRSA, cluster autoscaler, VPC CNI, and cluster logging
- Provider guidance targets AWS provider ~> 5.0 with least-privilege IAM and consistent tagging
Adoption & trust: 11.1k installs on skills.sh; 36.5k GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Journey fit
Canonical shelf is Operate/infra because the skill encodes production-grade networking, data, compute, and security modules teams maintain after ship. Module catalogs directly support provisioning and evolving cloud infrastructure—VCN/DRG on OCI and VPC/EKS/RDS on AWS map to the infra subphase.
Common Questions / FAQ
Is Terraform Module Library safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Terraform Module Library
# AWS Terraform Module Patterns ## VPC Module - VPC with public/private subnets - Internet Gateway and NAT Gateways - Route tables and associations - Network ACLs - VPC Flow Logs ## EKS Module - EKS cluster with managed node groups - IRSA (IAM Roles for Service Accounts) - Cluster autoscaler - VPC CNI configuration - Cluster logging ## RDS Module - RDS instance or cluster - Automated backups - Read replicas - Parameter groups - Subnet groups - Security groups ## S3 Module - S3 bucket with versioning - Encryption at rest - Bucket policies - Lifecycle rules - Replication configuration ## ALB Module - Application Load Balancer - Target groups - Listener rules - SSL/TLS certificates - Access logs ## Lambda Module - Lambda function - IAM execution role - CloudWatch Logs - Environment variables - VPC configuration (optional) ## Security Group Module - Reusable security group rules - Ingress/egress rules - Dynamic rule creation - Rule descriptions ## Best Practices 1. Use AWS provider version `~> 5.0` 2. Enable encryption by default 3. Use least-privilege IAM 4. Tag all resources consistently 5. Enable logging and monitoring 6. Use KMS for encryption 7. Implement backup strategies 8. Use PrivateLink when possible 9. Enable GuardDuty/SecurityHub 10. Follow AWS Well-Architected Framework # OCI Terraform Module Patterns ## VCN Module - VCN with public/private subnets - Dynamic Routing Gateway (DRG) attachments - Internet Gateway, NAT Gateway, Service Gateway - Route tables and security lists / NSGs - VCN Flow Logs ## OKE Module - OKE cluster and node pools - IAM policies and dynamic groups - VCN-native pod networking - Cluster autoscaling and observability hooks - OCIR integration ## Autonomous Database Module - Autonomous Database provisioning - Network access controls and private endpoints - Wallet and secret handling - Backup and maintenance preferences - Tagging and cost tracking ## Object Storage Module - Buckets with lifecycle rules - Versioning and retention - Customer-managed encryption keys - Replication policies - Event rules and service connectors ## Load Balancer Module - Public or private load balancer - Backend sets and listeners - TLS certificates - Health checks - Logging and metrics integration ## Best Practices 1. Use the OCI provider version `~> 7.26` 2. Model compartments explicitly and pass them through module interfaces 3. Prefer NSGs over broad security list rules where practical 4. Tag all resources with owner, environment, and cost center metadata 5. Use dynamic groups and least-privilege IAM policies for workload access 6. Keep network, identity, and data modules loosely coupled 7. Expose OCIDs and subnet details for module composition 8. Enable logging, metrics, and backup settings by default --- name: terraform-module-library description: Build reusable Terraform modules for AWS, Azure, GCP, and OCI infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components. --- # Terraform Module Library Production-ready Terraform module patterns for AWS, Azure, GCP, and OCI infrastructure. ## Purpose Create reusable, well-tested Terraform modules for common cloud infrastructure patterns across multiple cloud providers. ## When to Use - Build reusable infrastructure components - Standardize cloud resource provisioning - Implement infrastructure as code best practices - Create multi-cloud compatible modules - Establish organizational Terraform standards ## Module Structure ``` terraform-modules/ ├── aws/ │ ├── vpc/ │ ├── eks/ │ ├── rds/ │ └── s3/ ├── azure/ │ ├── vnet/ │ ├── aks/ │ └── storage/ ├── gcp/ │ ├── vpc/ │ ├── gke/ │ └── cloud-sql/ └── oci/ ├── vcn/ ├── oke/ └── object-storage/ ``` ## Standard Module Pattern ``` module-name/ ├── main.tf # Main resources ├── variables.tf # Input variables ├── outputs.tf # O