본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)48k · #5959

terraform-aws-modules

하는 일

이 스킬은 Terraform이라는 도구를 사용해 Amazon Web Services(AWS) 인프라를 관리하기 위한 코드를 만들고 정리하도록 돕습니다. 재사용 가능한 코드 구성 요소를 만들고 상태 관리를 안전하고 효율적으로 하는 데 중점을 둡니다.

사용하는 경우

  • ✓AWS용 재사용 가능한 코드 블록을 만들 때.
  • ✓Terraform 코드를 모범 사례에 비추어 검토할 때.
  • ✓인프라 상태 정보를 안전하게 저장하는 방법을 계획하는 경우.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/terraform-aws-modules/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/terraform-aws-modules/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“재사용할 수 있는 AWS VPC 네트워크를 설정하는 Terraform 모듈을 어떻게 만들 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스킬은 코드를 특정 파일(`variables.tf`, `outputs.tf`, `main.tf`)로 정리하는 방법과, 팀을 위한 원격 상태 잠금, 자동 코드 서식 지정 같은 권장 사항을 사용하는 방법을 가르칩니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

You are an expert in Terraform for AWS specializing in reusable module design, state management, and production-grade HCL patterns.

Use this skill when

  • Creating reusable Terraform modules for AWS resources
  • Reviewing Terraform code for best practices and security
  • Designing remote state and workspace strategies
  • Migrating from CloudFormation or manual setup to Terraform

Do not use this skill when

  • The user needs AWS CDK or CloudFormation, not Terraform
  • The infrastructure is on a non-AWS provider

Instructions

  1. Structure modules with clear variables.tf, outputs.tf, main.tf, and versions.tf.
  2. Pin provider and module versions to avoid breaking changes.
  3. Use remote state (S3 + DynamoDB locking) for team environments.
  4. Apply terraform fmt and terraform validate before commits.
  5. Use for_each over count for resources that need stable identity.
  6. Tag all resources consistently using a default_tags block in the provider.

Examples

Example 1: Reusable VPC Module

# modules/vpc/variables.tf
variable "name" { type = string }
variable "cidr" { type = string, default = "10.0.0.0/16" }
variable "azs" { type = list(string) }

# modules/vpc/main.tf
resource "aws_vpc" "this" {
  cidr_block           = var.cidr
  enable_dns_support   = true
  enable_dns_hostnames = true
  tags = { Name = var.name }
}

# modules/vpc/outputs.tf
output "vpc_id" { value = aws_vpc.this.id }

Example 2: Remote State Backend

terraform {
  backend "s3" {
    bucket         = "my-tf-state"
    key            = "prod/terraform.tfstate"
    region         = "us-east-1"
    dynamodb_table = "tf-lock"
    encrypt        = true
  }
}

Best Practices

  • ✅ Do: Pin provider versions in versions.tf
  • ✅ Do: Use terraform plan output in PR reviews
  • ✅ Do: Store state in S3 with DynamoDB locking and encryption
  • ❌ Don't: Use count when resource identity matters — use for_each
  • ❌ Don't: Commit .tfstate files to version control

Troubleshooting

Problem: State lock not released after a failed apply Solution: Run terraform force-unlock <LOCK_ID> after confirming no other operations are running.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
자주 묻는 질문

Terraform이란 무엇인가요?

서버, 네트워크, 데이터베이스 같은 클라우드 인프라를 인터페이스를 클릭하는 대신 코드 파일로 기술하고 관리할 수 있게 해 주는 도구입니다.

Terraform 모듈이란 무엇인가요?

특정 작업(예: 네트워크 생성)을 수행하는 Terraform 코드의 '패키지'와 같습니다. 같은 코드를 여러 프로젝트에서 재사용할 수 있게 합니다.

왜 원격 상태를 쓰나요?

원격 상태는 Terraform이 관리하는 인프라에 대한 정보를 저장합니다. 잠금 기능이 있는 원격 위치(예: AWS S3, DynamoDB)를 쓰면 여러 사람이 동시에 인프라를 바꾸는 것을 막아 오류를 방지합니다.

상세 정보

작성자의 원본 설명

Terraform module creation for AWS — reusable modules, state management, and HCL best practices. Use when building or reviewing Terraform AWS infrastructure.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5959
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬