スキル一覧に戻る
first-fluke

terraform-module-library

by first-fluke

terraform-module-libraryは、other分野における実用的なスキルです。複雑な課題への対応力を強化し、業務効率と成果の質を改善します。

141🍴 21📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: terraform-module-library description: Expert guidance for creating, managing, and using Terraform modules. Use this skill when the user wants to create reusable infrastructure components, standardize Terraform patterns, or needs help with module structure and best practices for AWS, GCP, or Azure.

Terraform Module Library

This skill provides standardized patterns and best practices for creating and using Terraform modules.

When to Use

  • Creating new reusable Terraform modules
  • Refactoring existing Terraform code into modules
  • Standardizing infrastructure patterns across the project
  • implement specific infrastructure components (VPC, GKE, RDS, etc.) using best practices

Module Structure

Standard directory structure for a Terraform module:

module-name/
├── main.tf       # Primary logic and resources
├── variables.tf  # Input variable definitions
├── outputs.tf    # Output value definitions
├── versions.tf   # Provider and Terraform version constraints
├── README.md     # Module documentation
└── examples/     # Example configurations
    └── complete/ # Full example usage

Best Practices

Cloud Providers

Google Cloud Platform (GCP)

  • Use google-beta provider for beta features if necessary, but prefer GA.
  • Follow Google's "Cloud Foundation Toolkit" patterns where applicable.
  • Resource naming: Use standardized prefixes/suffixes (e.g., gcp-vpc-{env}).

AWS

  • Use standard aws provider resources.
  • Tag all resources with consistent tags (Owner, Environment, Project).

General

  • Version Pinning: Always pin provider and Terraform versions in versions.tf.
  • Variables: Include description and type for all variables. Use validation blocks for constraints.
  • Outputs: Document all outputs.
  • State: Do not include backend configuration in modules; state is managed by the root configuration.

Common Module Patterns

Private Module Registry

If using a private registry, ensure source paths follow the registry's convention.

Local Modules

For local development or monorepos:

module "network" {
  source = "./modules/network"
  # ...
}

Review Checklist

  1. Does the module have a README.md with input/output documentation?
  2. Are all variables typed and described?
  3. Are resource names deterministic or correctly scoped?
  4. Does it include examples/?
  5. Is terraform_remote_state avoided within the module?

スコア

総合スコア

75/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

+5
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

+5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

レビュー

💬

レビュー機能は近日公開予定です