infrastructure-as-code
БесплатноЗапускает вложенные скриптыНе проверенBasic Resource:
Об этом скилле
Infrastructure as Code (IaC)
Automate infrastructure provisioning and management using declarative configuration with Terraform, enabling version-controlled, repeatable, and scalable infrastructure deployment.
Level 1: Quick Reference
Core Workflow
# Initialize Terraform
terraform init
# Preview changes
terraform plan -out=tfplan
# Apply changes
terraform apply tfplan
# Destroy infrastructure
terraform destroy
# Validate configuration
terraform validate
# Format code
terraform fmt -recursive
Essential Patterns
Basic Resource:
resource "aws_instance" "web" {
ami = var.ami_id
instance_type = var.instance_type
tags = {
Name = "${var.environment}-web"
Environment = var.environment
}
}
Module Usage:
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "~> 5.0"
name = "${var.environment}-vpc"
cidr = var.vpc_cidr
azs = var.availability_zones
private_subnets = var.private_subnet_cidrs
public_subnets = var.public_subnet_cidrs
enable_nat_gateway = true
enable_vpn_gateway = false
}
Remote State:
terraform {
backend "s3" {
bucket = "terraform-state-prod"
key = "networking/vpc/terraform.tfstate"
region = "us-east-1"
encrypt = true
dynamodb_table = "terraform-locks"
}
}
Critical Checklist
- Pin provider versions (
version = "~> 5.0") - Enable remote state with locking
- Use workspaces for environments
- Implement
.gitignorefor secrets - Run
terraform validatebefore commit - Review plan output before apply
- Tag all resources consistently
- Use variables for all environment-specific values
- Document module inputs/outputs
- Enable state encryption
Common Commands
# Workspace management
terraform workspace new dev
terraform workspace select prod
terraform workspace list
# State management
terraform state list
terraform state show aws_instance.web
terraform state mv aws_instance.old aws_instance.new
terraform state rm aws_instance.deprecated
# Import existing resources
terraform import aws_instance.web i-1234567890abcdef0
# Output values
terraform output
terraform output -json vpc_id
Level 2:
📚 Full Examples: See REFERENCE.md for complete code samples, detailed configurations, and production-ready implementations.
Implementation Guide
1. Terraform Fundamentals
Project Structure
See REFERENCE.md for complete implementation.
Provider Configuration
See REFERENCE.md for complete implementation.
Resources and Data Sources
See REFERENCE.md for complete implementation.
2. Module Development
Module Structure
See REFERENCE.md for complete implementation.
Module Versioning
See REFERENCE.md for complete implementation.
3. State Management
S3 Backend Configuration
See REFERENCE.md for complete implementation.
Backend Initialization Script
See REFERENCE.md for complete implementation.
State Operations
See REFERENCE.md for complete implementation.
4. Workspace Strategies
Environment Workspaces
See REFERENCE.md for complete implementation.
Workspace-Based Configuration
See REFERENCE.md for complete implementation.
5. Testing Infrastructure as Code
Terraform Validate and Format
See REFERENCE.md for complete implementation.
TFLint Configuration
See REFERENCE.md for complete implementation.
Terratest Example
See REFERENCE.md for complete implementation.
6. CI/CD Integration
GitHub Actions Workflow
See REFERENCE.md for complete implementation.
GitLab CI Pipeline
See REFERENCE.md for complete implementation.
7. Multi-Cloud Configuration
AWS + Azure Example
See REFERENCE.md for complete implementation.
GCP Configuration
See REFERENCE.md for complete implementation.
8. Security Best Practices
Secrets Management
See REFERENCE.md for complete implementation.
IAM Policy Best Practices
See REFERENCE.md for complete implementation.
Resource Encryption
See REFERENCE.md for complete implementation.
9. Drift Detection and Remediation
Drift Detection Script
*See [REFERENCE.md](./REFERENCE.md#exam
Установить infrastructure-as-code в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл infrastructure-as-code?
Basic Resource:
Как установить скилл infrastructure-as-code?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл infrastructure-as-code запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic