terraform-aws – skill DevOps & Hạ tầng cho agent AI
Cấp phát hạ tầng AWS bằng Terraform. Tạo module, quản lý state và áp dụng thực hành tốt nhất của IaC. Dùng khi triển khai tài nguyên AWS theo kiểu khai báo.
Cài skill terraform-aws bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/terraform-aws-aec71.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /terraform-aws – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/terraform-aws-aec71.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $terraform-aws – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/terraform-aws-aec71.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /terraform-aws – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/terraform-aws-aec71.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /terraform-aws – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc 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 destroyBest 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.
Execution boundaries
The HCL snippets omit application-specific resources and are not a complete deployable configuration. Pin module versions against the reviewed provider/runtime. Treat apply and destroy as separate authorized operations, not a command sequence to run wholesale. Verify account, region, backend identity, locking, encryption and the saved plan before applying; keep state and plan files private.
Skill liên quan
- terraform-aws-modules – Tạo module Terraform cho AWS — module tái sử dụng, quản lý state và thực hành tốt nhất…
- terraform-azure – Cấp phát hạ tầng Azure bằng Terraform. Cấu hình provider, quản lý state và triển khai…
- terraform-gcp – Cấp phát hạ tầng GCP bằng Terraform. Cấu hình provider và triển khai tài nguyên Google…
- terraform-infrastructure – Quy trình hạ tầng dưới dạng code với Terraform để cấp phát tài nguyên cloud, tạo module…
- terraform-module-library – Các mẫu module Terraform sẵn sàng cho production cho hạ tầng AWS, Azure và GCP.
- terraform-skill – Thực hành tốt nhất về hạ tầng dưới dạng code với Terraform
- terraform-specialist – Chuyên gia Terraform/OpenTofu, thành thạo tự động hóa IaC nâng cao, quản lý state và các…
- tune-monitor – Phân tích monitor của Monte Carlo và đề xuất thay đổi cấu hình để giảm nhiễu cảnh báo…