Back to skills
SKILL.md
Terraform Module Patterns
ASecurityWrite reusable Terraform modules with remote state
- 2 stars
- 0 votes
- 0 copies
- 3 views
- Added September 10, 2026
Security analysis
100/100npx -y skills add LoopyLuci/Skills --skill terraform-module-patterns --agent claude-codeAre you the author of Terraform Module Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/loopyluci-terraform-module-patterns)---
name: terraform-module-patterns
description: "Write reusable Terraform modules with remote state"
---
# Terraform Module Patterns
## Module Structure
```hcl
modules/
vpc/
main.tf
variables.tf
outputs.tf
```
## Reusable Module
```hcl
variable "name" { type = string }
variable "cidr" { type = string }
resource "aws_vpc" "this" {
cidr_block = var.cidr
tags = { Name = var.name }
}
```
## Remote State
```hcl
terraform {
backend "s3" {
bucket = "my-state-bucket"
key = "prod/terraform.tfstate"
region = "us-east-1"
}
}
```
Attribution
Comments
Loading comments…