Langsung ke konten
Skillpedia
Deploy & cloud (DevOps)48k Β· #5964

terraform-module-library

Fungsinya

Alat ini membantu membuat blok kode yang bisa digunakan ulang (module) untuk menyiapkan infrastruktur cloud, seperti jaringan dan database, menggunakan Terraform. Alat ini menyediakan template siap pakai untuk penyedia layanan seperti AWS, Azure, dan GCP.

Kapan dipakai

  • βœ“Saat membangun komponen infrastruktur yang akan dipakai berkali-kali.
  • βœ“Untuk menyeragamkan cara pembuatan resource cloud.
  • βœ“Saat ingin mengikuti praktik terbaik 'infrastructure as code'.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/terraform-module-library/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBuatkan module Terraform untuk jaringan virtual di AWS, dengan mengikuti praktik terbaik.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Alat ini menyediakan struktur kode dan contoh untuk berbagai layanan cloud. Anda memilih template, menyesuaikan konfigurasi yang diperlukan, lalu Terraform menangani pembuatan infrastrukturnya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Supporting material availability

This catalog copy contains the inline guidance below, but does not include the following supporting paths. They are external prerequisites, not bundled files:

  • <support-root>/assets/vpc-module/
  • <support-root>/assets/rds-module/
  • <support-root>/references/azure-modules.md
  • <support-root>/references/gcp-modules.md

Ask for the original supporting material or an existing installation before using a step that depends on these paths; this catalog does not identify a verified download source for them. Resolve each path relative to that installation, inspect its contents, and verify any applicable license and execution prerequisites. Do not run a command or claim a referenced procedure was followed until its required file exists. Do not fabricate the missing scripts or treat an unrelated file with the same name as equivalent. Independent steps fully documented here can proceed within the user’s authorized scope; report any dependent step as unavailable.

Terraform Module Library

Production-ready Terraform module patterns for AWS, Azure, and GCP infrastructure.

Do not use this skill when

  • The task is unrelated to terraform module library
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.

Purpose

Create reusable, well-tested Terraform modules for common cloud infrastructure patterns across multiple cloud providers.

Use this skill when

  • Build reusable infrastructure components
  • Standardize cloud resource provisioning
  • Implement infrastructure as code best practices
  • Create multi-cloud compatible modules
  • Establish organizational Terraform standards

Module Structure

terraform-modules/
β”œβ”€β”€ aws/
β”‚   β”œβ”€β”€ vpc/
β”‚   β”œβ”€β”€ eks/
β”‚   β”œβ”€β”€ rds/
β”‚   └── s3/
β”œβ”€β”€ azure/
β”‚   β”œβ”€β”€ vnet/
β”‚   β”œβ”€β”€ aks/
β”‚   └── storage/
└── gcp/
    β”œβ”€β”€ vpc/
    β”œβ”€β”€ gke/
    └── cloud-sql/

Standard Module Pattern

module-name/
β”œβ”€β”€ main.tf          # Main resources
β”œβ”€β”€ variables.tf     # Input variables
β”œβ”€β”€ outputs.tf       # Output values
β”œβ”€β”€ versions.tf      # Provider versions
β”œβ”€β”€ README.md        # Documentation
β”œβ”€β”€ examples/        # Usage examples
β”‚   └── complete/
β”‚       β”œβ”€β”€ main.tf
β”‚       └── variables.tf
└── tests/           # Terratest files
    └── module_test.go

AWS VPC Module Example

main.tf:

resource "aws_vpc" "main" {
  cidr_block           = var.cidr_block
  enable_dns_hostnames = var.enable_dns_hostnames
  enable_dns_support   = var.enable_dns_support

  tags = merge(
    {
      Name = var.name
    },
    var.tags
  )
}

resource "aws_subnet" "private" {
  count             = length(var.private_subnet_cidrs)
  vpc_id            = aws_vpc.main.id
  cidr_block        = var.private_subnet_cidrs[count.index]
  availability_zone = var.availability_zones[count.index]

  tags = merge(
    {
      Name = "${var.name}-private-${count.index + 1}"
      Tier = "private"
    },
    var.tags
  )
}

resource "aws_internet_gateway" "main" {
  count  = var.create_internet_gateway ? 1 : 0
  vpc_id = aws_vpc.main.id

  tags = merge(
    {
      Name = "${var.name}-igw"
    },
    var.tags
  )
}

variables.tf:

variable "name" {
  description = "Name of the VPC"
  type        = string
}

variable "cidr_block" {
  description = "CIDR block for VPC"
  type        = string
  validation {
    condition     = can(regex("^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$", var.cidr_block))
    error_message = "CIDR block must be valid IPv4 CIDR notation."
  }
}

variable "availability_zones" {
  description = "List of availability zones"
  type        = list(string)
}

variable "private_subnet_cidrs" {
  description = "CIDR blocks for private subnets"
  type        = list(string)
  default     = []
}

variable "enable_dns_hostnames" {
  description = "Enable DNS hostnames in VPC"
  type        = bool
  default     = true
}

variable "tags" {
  description = "Additional tags"
  type        = map(string)
  default     = {}
}

outputs.tf:

output "vpc_id" {
  description = "ID of the VPC"
  value       = aws_vpc.main.id
}

output "private_subnet_ids" {
  description = "IDs of private subnets"
  value       = aws_subnet.private[*].id
}

output "vpc_cidr_block" {
  description = "CIDR block of VPC"
  value       = aws_vpc.main.cidr_block
}

Best Practices

…

Pertanyaan umum

Apa itu Terraform?

Terraform adalah alat yang memungkinkan Anda mendeskripsikan dan menyediakan infrastruktur cloud menggunakan kode, sehingga prosesnya bisa diulang dan andal.

Apa itu module Terraform?

Module adalah paket resource Terraform yang bisa digunakan ulang di berbagai proyek atau bagian dari sebuah proyek, seperti balok bangunan.

Penyedia cloud apa saja yang didukung?

Penyedia utama yang didukung adalah AWS, Azure, dan Google Cloud Platform (GCP).

Detail

Deskripsi asli dari pembuat

Production-ready Terraform module patterns for AWS, Azure, and GCP infrastructure.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#5964
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa