Live survey315 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

Terraform Module Patterns

skill · revfactory/harness-100Apache-2.0 licenceAudited 12 Oct 2026 · source 459e1bb8f76e

★ 1,297pushed 203 days ago
✓SAFEGrade B · 89/100 · 12 Oct 2026 · 459e1bb
1,297repo stars · whole revfactory/harness-100

Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 459e1bb8f76e and found no filesystem, network or shell access and no hard-coded secrets. What it does: Terraform 모듈 설계 패턴, 디렉토리 구조, 상태 관리, 환경 분리 전략의 상세 가이드. 'Terraform 모듈', '모듈 구조', '상태 관리', 'remote state', '환경 분리', 'workspace', 'terragrunt', '모듈 패턴' 등 Terraform 모듈 설계 시 이 스킬을 사용한다. infra-architect와 drift-detector의 IaC 설계…

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Terraform Module Patterns (revfactory/harness-100)”. Retrieved 12 Oct 2026. https://modelsatlas.com/skills/revfactory/terraform-module-patterns

Trust audit

Audit 0.4.1 · source read 12 Oct 2026

Trust score89/100✓SAFE B
0 critical0 high0 medium0 low0 info

SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codeNA0
L2 InstructionsPrompt injection, authority framing, hidden directivesPASS0
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (0)

No findings at any severity. We re-audit when the source changes.

Audit 0.4.1 · source sha 459e1bb8f76e · 12 Oct 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

  • Publisherrevfactory GitHub userOwner of the repository this skill is read from
  • Source folderrevfactory/harness-100/ko/26-infra-as-code/.claude/skills/terraform-module-patternsThe exact folder we audited
  • LicenceApache-2.0As the repository states it
  • Commit pinned for this verdict459e1bb8f76eA new audit runs when the source changes
  • Repository statusNot archivedLast push 203 days ago
  • Sandboxed runNot runSkills are read, not executed; layer L4 is skipped

What it tells the agent

Full source on GitHub ↗

Its description: Terraform 모듈 설계 패턴, 디렉토리 구조, 상태 관리, 환경 분리 전략의 상세 가이드. 'Terraform 모듈', '모듈 구조', '상태 관리', 'remote state', '환경 분리', 'workspace', 'terragrunt', '모듈 패턴' 등 Terraform 모듈 설계 시 이 스킬을 사용한다. infra-architect와 drift-detector의 IaC 설계…

---
name: terraform-module-patterns
description: "Terraform 모듈 설계 패턴, 디렉토리 구조, 상태 관리, 환경 분리 전략의 상세 가이드. 'Terraform 모듈', '모듈 구조', '상태 관리', 'remote state', '환경 분리', 'workspace', 'terragrunt', '모듈 패턴' 등 Terraform 모듈 설계 시 이 스킬을 사용한다. infra-architect와 drift-detector의 IaC 설계 역량을 강화한다. 단, 실제 terraform apply나 인프라 프로비저닝 실행은 이 스킬의 범위가 아니다."
---

# Terraform Module Patterns — Terraform 모듈 설계 패턴 가이드

재사용 가능하고 유지보수성 높은 Terraform 모듈 설계를 위한 패턴과 베스트 프랙티스.

## 디렉토리 구조 패턴

### 패턴 1: 모듈 레이어 분리

```
infrastructure/
├── modules/                    # 재사용 가능한 모듈
│   ├── networking/
│   │   ├── vpc/
│   │   │   ├── main.tf
│   │   │   ├── variables.tf
│   │   │   ├── outputs.tf
│   │   │   └── README.md
│   │   ├── security-group/
│   │   └── load-balancer/
│   ├── compute/
│   │   ├── ecs-service/
│   │   ├── lambda/
│   │   └── ec2-asg/
│   └── data/
│       ├── rds/
│       ├── elasticache/
│       └── s3/
├── environments/               # 환경별 구성
│   ├── dev/
│   │   ├── main.tf            # 모듈 호출
│   │   ├── terraform.tfvars   # 환경 변수
│   │   └── backend.tf         # 상태 저장소
│   ├── staging/
│   └── prod/
└── global/                    # 환경 공통 (IAM, DNS)
    ├── iam/
    └── route53/
```

### 패턴 2: Terragrunt 기반 DRY

```
infrastructure/
├── modules/                    # 동일
├── terragrunt.hcl             # 루트 설정 (backend, provider)
└── environments/
    ├── terragrunt.hcl         # 공통 변수
    ├── dev/
    │   ├── terragrunt.hcl     # include root + env vars
    │   ├── vpc/
    │   │   └── terragrunt.hcl # module source + inputs
    │   ├── ecs/
    │   └── rds/
    └── prod/
```

## 모듈 설계 원칙

### 1. 단일 책임 모듈

```hcl
# 좋은 예: VPC 모듈은 VPC만 담당
module "vpc" {
  source = "./modules/networking/vpc"
  cidr_block = "10.0.0.0/16"
  az_count   = 3
}

# 나쁜 예: 하나의 모듈에 모든 인프라
module "everything" {  # 안티패턴!
  source = "./modules/full-stack"
}
```

### 2. 입력/출력 설계

```hcl
# variables.tf — 유효성 검증 필수
variable "instance_type" {
  type        = string
  description = "EC2 인스턴스 타입"
  default     = "t3.medium"
  validation {
    condition     = can(regex("^t3\\.", var.instance_type))
    error_message = "t3 패밀리만 허용됩니다."
  }
}

variable "environment" {
  type = string
  validation {
    condition     = contains(["dev", "staging", "prod"], var.environment)
    error_message = "dev, staging, prod 중 하나여야 합니다."
  }
}

# outputs.tf — 다른 모듈이 필요한 값만 노출
output "vpc_id" {
  value       = aws_vpc.main.id
  description = "생성된 VPC의 ID"
}
```

### 3. 조건부 리소스

```hcl
variable "enable_monitoring" {
  type    = bool
  default = true
}

resource "aws_cloudwatch_metric_alarm" "cpu" {
  count = var.enable_monitoring ? 1 : 0
  # ...
}
```

## 상태 관리 패턴

### Remote State 구성

```hcl
# backend.tf
terraform {
  backend "s3" {
    bucket         = "company-terraform-state"
    key            = "environments/prod/vpc/terraform.tfstate"
    region         = "ap-northeast-2"
    dynamodb_table = "terraform-locks"
    encrypt        = true
  }
}
```

### 상태 분리 전략

| 전략 | 분리 기준 | 장점 | 단점 |
|------|----------|------|------|
| **환경별** | dev/staging/prod | 환경 격리, 독립 배포 | 환경 간 참조 시 data source 필요 |
| **계층별** | network/compute/data | blast radius 축소 | 참조 관계 관리 복잡 |
| **팀별** | 팀 소유 리소스 | 자율성 | 공유 리소스 관리 어려움 |
| **라이프사이클별** | 변경 빈도 | 안정 리소스 보호 | 경계 설정 어려움 |

### Cross-State 참조

```hcl
# Network 상태에서 VPC ID 읽기
data "terraform_remote_state" "network" {
  backend = "s3"
  config = {
    bucket = "company-terraform-state"
    key    = "environments/prod/network/terraform.tfstate"
    region = "ap-northeast-2"
  }
}

# 사용
resource "aws_ecs_service" "app" {
  network_configuration {
    subnets = data.terraform_remote_state.network.outputs.private_subnet_ids
  }
}
```

## 태깅 전략

```hcl
locals {
  common_tags = {
    Environment = var.environment
    Project     = var.project_name
    ManagedBy   = "terraform"
    Team        = var.team_name
    CostCenter  = var.cost_center
  }
}

resource "aws_instance" "app" {
  tags = merge(local.common_tags, {
    Name = "${var.project_name}-${var.environment}-app"
    Role = "application"
  })
}
```

## 안티패턴과 해결

| 안티패턴 | 문제 | 해결 |
|---------|------|------|
| **거대 상태 파일** | plan/apply 느림, blast radius 큼 | 계층별 분리 |
| **하드코딩 값** | 환경 간 재사용 불가 | variables + tfvars |
| **모듈 내 provider** | 유연성 상실 | provider는 루트에서만 |
| **count로 복잡한 조건** | 인덱스 변경 시 리소스 재생성 | for_each 사용 |
| **시크릿 평문 저장** | 보안 위반 | SSM/Vault 참조 |

Excerpt, first 4,336 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit 459e1bb

Download folder ↗
git clone https://github.com/revfactory/harness-100
git -C harness-100 checkout 459e1bb8f76e

The author documents no install command, so this uses the repository directly. Our verdict covers commit 459e1bb8f76e only.

Works in

The author has not said which agents this skill supports, and we have not tested it in any.

Audit history

Every audit, every source change

  1. ✓SAFE B 89 / 100

    first audit · source 459e1bb8f76e

README badge

For maintainers · shows the latest audit

ModelsAtlas: SAFE BMODELSATLASSAFE · B
[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/revfactory/terraform-module-patterns/badge.svg)](https://modelsatlas.com/skills/revfactory/terraform-module-patterns/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

Add this badge to your README

[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/revfactory/terraform-module-patterns/badge.svg)](https://modelsatlas.com/skills/revfactory/terraform-module-patterns/)

Questions about Terraform Module Patterns

Is Terraform Module Patterns safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Terraform Module Patterns access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (459e1bb8f76e), read on 2026-10-12. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.