{
    "url": "https://delaparra-services.nl/skills/terraform-module-library",
    "locale": "en",
    "title": "Terraform Module Library | DeLaParra Services",
    "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.",
    "alternates": {
        "en": "https://delaparra-services.nl/skills/terraform-module-library",
        "nl": "https://delaparra-services.nl/nl/skills/terraform-module-library"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/skills/terraform-module-library.csv",
        "md": "https://delaparra-services.nl/skills/terraform-module-library.md",
        "json": "https://delaparra-services.nl/skills/terraform-module-library.json",
        "zip": "https://delaparra-services.nl/skills/terraform-module-library.zip",
        "pdf": "https://delaparra-services.nl/skills/terraform-module-library.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/skills/terraform-module-library.csv",
            "encodingFormat": "text/csv",
            "name": "terraform-module-library.csv"
        },
        {
            "url": "https://delaparra-services.nl/skills/terraform-module-library.json",
            "encodingFormat": "application/json",
            "name": "terraform-module-library.json"
        },
        {
            "url": "https://delaparra-services.nl/skills/terraform-module-library.md",
            "encodingFormat": "text/markdown",
            "name": "terraform-module-library.md"
        },
        {
            "url": "https://delaparra-services.nl/skills/terraform-module-library.pdf",
            "encodingFormat": "application/pdf",
            "name": "terraform-module-library.pdf"
        },
        {
            "url": "https://delaparra-services.nl/skills/terraform-module-library.zip",
            "encodingFormat": "application/zip",
            "name": "terraform-module-library.zip"
        },
        {
            "url": "https://delaparra-services.nl/skills/terraform-module-library/download",
            "encodingFormat": "application/zip",
            "name": "terraform-module-library-files.zip"
        }
    ],
    "markdown": "# Terraform Module Library\n\n \n\nBuild 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.\n\n \n\n**Licence** MIT\n\n \n\n**Source** wshobson/agents\n\n [Download zip](<https://delaparra-services.nl/skills/terraform-module-library/download>)   \n\n# Terraform Module Library\n\n \n\nProduction-ready Terraform module patterns for AWS, Azure, GCP, and OCI infrastructure.\n\n \n\n## Purpose\n\n \n\nCreate reusable, well-tested Terraform modules for common cloud infrastructure patterns across multiple cloud providers.\n\n \n\n## When to Use\n\n \n\n- Build reusable infrastructure components \n- Standardize cloud resource provisioning \n- Implement infrastructure as code best practices \n- Create multi-cloud compatible modules \n- Establish organizational Terraform standards\n\n \n\n## Module Structure\n\n \n\n```\nterraform-modules/\n├── aws/\n│   ├── vpc/\n│   ├── eks/\n│   ├── rds/\n│   └── s3/\n├── azure/\n│   ├── vnet/\n│   ├── aks/\n│   └── storage/\n├── gcp/\n│   ├── vpc/\n│   ├── gke/\n│   └── cloud-sql/\n└── oci/\n    ├── vcn/\n    ├── oke/\n    └── object-storage/\n```\n\n \n\n## Standard Module Pattern\n\n \n\n```\nmodule-name/\n├── main.tf          # Main resources\n├── variables.tf     # Input variables\n├── outputs.tf       # Output values\n├── versions.tf      # Provider versions\n├── README.md        # Documentation\n├── examples/        # Usage examples\n│   └── complete/\n│       ├── main.tf\n│       └── variables.tf\n└── tests/           # Terratest files\n    └── module_test.go\n```\n\n \n\n## AWS VPC Module Example\n\n \n\n**main.tf:**\n\n \n\n```\nresource \"aws_vpc\" \"main\" {\n  cidr_block           = var.cidr_block\n  enable_dns_hostnames = var.enable_dns_hostnames\n  enable_dns_support   = var.enable_dns_support\n\n  tags = merge(\n    {\n      Name = var.name\n    },\n    var.tags\n  )\n}\n\nresource \"aws_subnet\" \"private\" {\n  count             = length(var.private_subnet_cidrs)\n  vpc_id            = aws_vpc.main.id\n  cidr_block        = var.private_subnet_cidrs[count.index]\n  availability_zone = var.availability_zones[count.index]\n\n  tags = merge(\n    {\n      Name = \"${var.name}-private-${count.index + 1}\"\n      Tier = \"private\"\n    },\n    var.tags\n  )\n}\n\nresource \"aws_internet_gateway\" \"main\" {\n  count  = var.create_internet_gateway ? 1 : 0\n  vpc_id = aws_vpc.main.id\n\n  tags = merge(\n    {\n      Name = \"${var.name}-igw\"\n    },\n    var.tags\n  )\n}\n```\n\n \n\n**variables.tf:**\n\n \n\n```\nvariable \"name\" {\n  description = \"Name of the VPC\"\n  type        = string\n}\n\nvariable \"cidr_block\" {\n  description = \"CIDR block for VPC\"\n  type        = string\n  validation {\n    condition     = can(regex(\"^([0-9]{1,3}\\\\.){3}[0-9]{1,3}/[0-9]{1,2}$\", var.cidr_block))\n    error_message = \"CIDR block must be valid IPv4 CIDR notation.\"\n  }\n}\n\nvariable \"availability_zones\" {\n  description = \"List of availability zones\"\n  type        = list(string)\n}\n\nvariable \"private_subnet_cidrs\" {\n  description = \"CIDR blocks for private subnets\"\n  type        = list(string)\n  default     = []\n}\n\nvariable \"enable_dns_hostnames\" {\n  description = \"Enable DNS hostnames in VPC\"\n  type        = bool\n  default     = true\n}\n\nvariable \"tags\" {\n  description = \"Additional tags\"\n  type        = map(string)\n  default     = {}\n}\n```\n\n \n\n**outputs.tf:**\n\n \n\n```\noutput \"vpc_id\" {\n  description = \"ID of the VPC\"\n  value       = aws_vpc.main.id\n}\n\noutput \"private_subnet_ids\" {\n  description = \"IDs of private subnets\"\n  value       = aws_subnet.private[*].id\n}\n\noutput \"vpc_cidr_block\" {\n  description = \"CIDR block of VPC\"\n  value       = aws_vpc.main.cidr_block\n}\n```\n\n \n\n## Best Practices\n\n \n\n1. **Use semantic versioning** for modules \n1. **Document all variables** with descriptions \n1. **Provide examples** in examples/ directory \n1. **Use validation blocks** for input validation \n1. **Output important attributes** for module composition \n1. **Pin provider versions** in versions.tf \n1. **Use locals** for computed values \n1. **Implement conditional resources** with count/for\\_each \n1. **Test modules** with Terratest \n1. **Tag all resources** consistently\n\n \n\n**Reference:** See ` references/aws-modules.md ` and ` references/oci-modules.md `\n\n \n\n## Module Composition\n\n \n\n```\nmodule \"vpc\" {\n  source = \"../../modules/aws/vpc\"\n\n  name               = \"production\"\n  cidr_block         = \"10.0.0.0/16\"\n  availability_zones = [\"us-west-2a\", \"us-west-2b\", \"us-west-2c\"]\n\n  private_subnet_cidrs = [\n    \"10.0.1.0/24\",\n    \"10.0.2.0/24\",\n    \"10.0.3.0/24\"\n  ]\n\n  tags = {\n    Environment = \"production\"\n    ManagedBy   = \"terraform\"\n  }\n}\n\nmodule \"rds\" {\n  source = \"../../modules/aws/rds\"\n\n  identifier     = \"production-db\"\n  engine         = \"postgres\"\n  engine_version = \"15.3\"\n  instance_class = \"db.t3.large\"\n\n  vpc_id     = module.vpc.vpc_id\n  subnet_ids = module.vpc.private_subnet_ids\n\n  tags = {\n    Environment = \"production\"\n  }\n}\n```\n\n \n\n## Testing\n\n \n\n```\n// tests/vpc_test.go\npackage test\n\nimport (\n    \"testing\"\n    \"github.com/gruntwork-io/terratest/modules/terraform\"\n    \"github.com/stretchr/testify/assert\"\n)\n\nfunc TestVPCModule(t *testing.T) {\n    terraformOptions := &terraform.Options{\n        TerraformDir: \"../examples/complete\",\n    }\n\n    defer terraform.Destroy(t, terraformOptions)\n    terraform.InitAndApply(t, terraformOptions)\n\n    vpcID := terraform.Output(t, terraformOptions, \"vpc_id\")\n    assert.NotEmpty(t, vpcID)\n}\n```\n\n \n\n## Related Skills\n\n \n\n- ` multi-cloud-architecture ` - For architectural decisions \n- ` cost-optimization ` - For cost-effective designs\n\n \n\n## Files\n\n \n\n- ` LICENSE ` \n- ` SKILL.md ` \n- ` SOURCE.md ` \n- ` references/aws-modules.md ` \n- ` references/oci-modules.md `\n\n \n\n## Related terms\n\n \n\n- [apply](<https://delaparra-services.nl/knowledge-hub/apply-terraform>) \n- [attribute](<https://delaparra-services.nl/knowledge-hub/attribute>) \n- [block](<https://delaparra-services.nl/knowledge-hub/block>) \n- [count](<https://delaparra-services.nl/knowledge-hub/count>) \n- [data source](<https://delaparra-services.nl/knowledge-hub/data-source>) \n- [depends\\_on](<https://delaparra-services.nl/knowledge-hub/depends-on-terraform>) \n- [destroy](<https://delaparra-services.nl/knowledge-hub/destroy>) \n- [drift](<https://delaparra-services.nl/knowledge-hub/drift>) \n- [expression](<https://delaparra-services.nl/knowledge-hub/expression>) \n- [fmt](<https://delaparra-services.nl/knowledge-hub/fmt>) \n- [for expression](<https://delaparra-services.nl/knowledge-hub/for-expression>) \n- [for\\_each](<https://delaparra-services.nl/knowledge-hub/for-each>) \n- [heredoc](<https://delaparra-services.nl/knowledge-hub/heredoc>) \n- [IaC (Infrastructure as Code)](<https://delaparra-services.nl/knowledge-hub/iac-infrastructure-as-code>) \n- [import](<https://delaparra-services.nl/knowledge-hub/import>) \n- [init](<https://delaparra-services.nl/knowledge-hub/init>) \n- [interpolation](<https://delaparra-services.nl/knowledge-hub/interpolation>) \n- [lifecycle](<https://delaparra-services.nl/knowledge-hub/lifecycle>) \n- [locals](<https://delaparra-services.nl/knowledge-hub/locals>) \n- [module](<https://delaparra-services.nl/knowledge-hub/module>) \n- [output](<https://delaparra-services.nl/knowledge-hub/output>) \n- [plan](<https://delaparra-services.nl/knowledge-hub/plan>) \n- [provider](<https://delaparra-services.nl/knowledge-hub/provider>) \n- [provider alias](<https://delaparra-services.nl/knowledge-hub/provider-alias>) \n- [refresh](<https://delaparra-services.nl/knowledge-hub/refresh>) \n- [remote backend](<https://delaparra-services.nl/knowledge-hub/remote-backend>) \n- [resource](<https://delaparra-services.nl/knowledge-hub/resource>) \n- [state file](<https://delaparra-services.nl/knowledge-hub/state-file>) \n- [state lock](<https://delaparra-services.nl/knowledge-hub/state-lock>) \n- [state mv / rm](<https://delaparra-services.nl/knowledge-hub/state-mv-rm>) \n- [taint](<https://delaparra-services.nl/knowledge-hub/taint-terraform>) \n- [ternary](<https://delaparra-services.nl/knowledge-hub/ternary>) \n- [terraform block](<https://delaparra-services.nl/knowledge-hub/terraform-block>) \n- [terraform.tfstate](<https://delaparra-services.nl/knowledge-hub/terraformtfstate>) \n- [validate](<https://delaparra-services.nl/knowledge-hub/validate>) \n- [variable](<https://delaparra-services.nl/knowledge-hub/variable>) \n- [workspace](<https://delaparra-services.nl/knowledge-hub/workspace>)\n\n \n\n[Installing an agent skill in Claude Code, Codex, Cursor and Copilot](<https://delaparra-services.nl/manuals/een-skill-installeren-in-je-ai-assistent>)\n\n[HTML version](https://delaparra-services.nl/skills/terraform-module-library)\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://delaparra-services.nl/#practice",
                "logo": "https://delaparra-services.nl/logo.png",
                "name": "DeLaParra Services",
                "legalName": "DeLaParra Services",
                "url": "https://delaparra-services.nl/",
                "description": "Bespoke software, web applications and mobile apps, developed in Laravel by a single developer in Groningen. Fixed price agreed in advance, full source code provided upon delivery.",
                "email": "info@delaparra-services.nl",
                "address": {
                    "@type": "PostalAddress",
                    "addressLocality": "Groningen",
                    "addressRegion": "Groningen",
                    "addressCountry": "NL"
                },
                "areaServed": "Groningen, the Netherlands",
                "knowsLanguage": [
                    "en",
                    "nl"
                ],
                "knowsAbout": [
                    "Web design and development",
                    "App development",
                    "Custom software and web applications",
                    "OpenSpec",
                    "AI code review",
                    "Your own coding agent"
                ],
                "founder": {
                    "@id": "https://delaparra-services.nl/#person"
                }
            },
            {
                "@type": "WebPage",
                "@id": "https://delaparra-services.nl/skills/terraform-module-library#webpage",
                "url": "https://delaparra-services.nl/skills/terraform-module-library",
                "name": "Terraform Module Library | DeLaParra Services",
                "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.",
                "isPartOf": {
                    "@id": "https://delaparra-services.nl/#website"
                },
                "about": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "inLanguage": "en",
                "breadcrumb": {
                    "@id": "https://delaparra-services.nl/skills/terraform-module-library#breadcrumb"
                }
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://delaparra-services.nl/skills/terraform-module-library#breadcrumb",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "Home",
                        "item": "https://delaparra-services.nl/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Terraform Module Library"
                    }
                ]
            },
            {
                "@type": "Person",
                "@id": "https://delaparra-services.nl/#person",
                "name": "Reinier de la Parra",
                "url": "https://delaparra-services.nl/about"
            },
            {
                "@type": "SoftwareSourceCode",
                "@id": "https://delaparra-services.nl/skills/terraform-module-library#skill",
                "url": "https://delaparra-services.nl/skills/terraform-module-library",
                "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.",
                "inLanguage": "en",
                "license": "https://spdx.org/licenses/MIT.html",
                "subjectOf": {
                    "@id": "https://delaparra-services.nl/skills/terraform-module-library#dataset"
                }
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/skills/terraform-module-library#dataset",
                "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.",
                "url": "https://delaparra-services.nl/skills/terraform-module-library",
                "identifier": "https://delaparra-services.nl/skills/terraform-module-library#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/skills/terraform-module-library#skill"
                },
                "creditText": "wshobson/agents",
                "publisher": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "license": "https://spdx.org/licenses/MIT.html",
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "dateModified": "2026-11-28T14:00:12+00:00",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/knowledge-hub#skills",
                    "name": "Skills for AI coding assistants",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "terraform-module-library.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/skills/terraform-module-library.csv",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "terraform-module-library.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/skills/terraform-module-library.json",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "terraform-module-library.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/skills/terraform-module-library.md",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "terraform-module-library.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/skills/terraform-module-library.pdf",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "terraform-module-library.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/skills/terraform-module-library.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "terraform-module-library-files.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/skills/terraform-module-library/download",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    }
                ]
            }
        ]
    }
}