本文へスキップ
Skillpedia
デプロイとクラウド(DevOps)48k · #5960

terraform-aws

できること

このツールは、Terraform というコードを使って、Amazonのクラウド(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に貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/terraform-aws/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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(Amazon Web Services)は、Amazonが提供するクラウドコンピューティングサービスの総称で、ストレージ、処理能力、データベースなどを利用できます。

クラウドの「リソース」とは何ですか?

リソースとは、クラウド上で使う構成要素のことです。仮想マシン(サーバー)、ストレージ、ネットワーク、データベースなどが含まれます。

詳細

作者による元の説明

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

人気

GitHubのスター
48k
ランキング
#5960
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル