terraform-aws
它能做什么
这个工具可以帮你使用 Terraform 这种代码,在亚马逊云(AWS)上创建和管理资源。你可以把它理解为:给 AWS 下达指令,让它帮你搭建并维护基础设施。
适用场景
- ✓当你需要在 AWS 中创建服务器、网络或数据库时。
- ✓当你想整理并自动化 AWS 基础设施的搭建过程时。
- ✓当你需要确保 AWS 基础设施始终保持一致时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/terraform-aws/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“用 Terraform 在 AWS 中创建一个虚拟网络(VPC)和一台 Web 服务器。”
每周 5 个新技能,1 分钟读完。
工作原理
你用代码描述想在 AWS 中实现的效果。Terraform 读取这些代码,并与 AWS 通信,按照你的要求精确地创建或修改资源。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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.
常见问题
什么是 Terraform?
Terraform 是一个工具,让你能够用代码描述和管理云端基础设施(比如服务器和网络),而且过程安全、结果可预期。
什么是 AWS?
AWS(亚马逊云科技)是亚马逊推出的一套云计算服务,包括存储、计算能力和数据库等。
云端的“资源”是什么?
资源是你在云端使用的各种组件,比如虚拟机(服务器)、存储空间、网络、数据库等。
详情
作者的原始描述
Provision AWS infrastructure with Terraform. Create modules, manage state, and implement IaC best practices. Use when deploying AWS resources declaratively.
热度
- GitHub 星标
- 48k
- 排名
- #5960
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。