Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)48k · #5960

terraform-aws

Skill này làm gì

Công cụ này giúp tạo và quản lý tài nguyên trên đám mây của Amazon (AWS) bằng code Terraform. Nó giống như đưa cho AWS hướng dẫn để xây dựng và duy trì hạ tầng của bạn.

Khi nào nên dùng

  • ✓Khi tạo máy chủ, mạng hoặc cơ sở dữ liệu trên AWS.
  • ✓Khi bạn muốn tổ chức và tự động hóa việc thiết lập hạ tầng AWS.
  • ✓Khi bạn cần đảm bảo hạ tầng AWS luôn nhất quán.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/terraform-aws/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một mạng ảo (VPC) và một máy chủ web trên AWS bằng Terraform.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn viết code mô tả điều bạn muốn có trên AWS. Terraform đọc code này và giao tiếp với AWS để tạo hoặc chỉnh sửa tài nguyên đúng như bạn yêu cầu.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

When to Use

  • Provisioning, hardening, or operating the infrastructure described in this skill within an authorized environment.

Terraform AWS

Provision and manage AWS infrastructure with Terraform.

Provider Configuration

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 5.0"
    }
  }
  
  backend "s3" {
    bucket = "terraform-state"
    key    = "prod/terraform.tfstate"
    region = "us-east-1"
  }
}

provider "aws" {
  region = var.region
  
  default_tags {
    tags = {
      Environment = var.environment
      ManagedBy   = "terraform"
    }
  }
}

Example Resources

resource "aws_vpc" "main" {
  cidr_block           = "10.0.0.0/16"
  enable_dns_hostnames = true
  
  tags = { Name = "main-vpc" }
}

resource "aws_instance" "web" {
  ami           = data.aws_ami.amazon_linux.id
  instance_type = "t3.micro"
  subnet_id     = aws_subnet.public.id
  
  tags = { Name = "web-server" }
}

Modules

module "vpc" {
  source = "terraform-aws-modules/vpc/aws"
  
  name = "my-vpc"
  cidr = "10.0.0.0/16"
  
  azs             = ["us-east-1a", "us-east-1b"]
  private_subnets = ["10.0.1.0/24", "10.0.2.0/24"]
  public_subnets  = ["10.0.101.0/24", "10.0.102.0/24"]
  
  enable_nat_gateway = true
}

Commands

terraform init
terraform plan -out=plan.tfplan
terraform apply plan.tfplan
terraform destroy

Best Practices

  • Use remote state with locking
  • Implement module structure
  • Use workspaces or separate states per environment
  • Pin provider versions
  • Use data sources for AMIs

Related Skills

  • aws-vpc (aws-vpc) - VPC networking
  • aws-iam (aws-iam) - IAM policies

When to Use

  • You are provisioning, configuring, or troubleshooting the infrastructure component covered by this skill (servers, storage, databases, networking, cloud, local AI).

Limitations

  • Infrastructure commands can disrupt services: confirm target host/scope and have backups/snapshots before mutating state.
  • Docs-only import: upstream scripts and templates not bundled.
Câu hỏi thường gặp

Terraform là gì?

Terraform là công cụ cho phép bạn mô tả và quản lý hạ tầng đám mây (như máy chủ và mạng) bằng code, một cách an toàn và có thể dự đoán.

AWS là gì?

AWS (Amazon Web Services) là bộ dịch vụ điện toán đám mây do Amazon cung cấp, như lưu trữ, năng lực xử lý và cơ sở dữ liệu.

“Tài nguyên” trên đám mây là gì?

Tài nguyên là các thành phần bạn dùng trên đám mây, như máy ảo (máy chủ), không gian lưu trữ, mạng, cơ sở dữ liệu, v.v.

Chi tiết

Mô tả gốc của tác giả

Provision AWS infrastructure with Terraform. Create modules, manage state, and implement IaC best practices. Use when deploying AWS resources declaratively.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5960
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự