소스 정보
- 저장소
- tools-only/X-Skills
- 최근 소스 활동
- 2026년 2월 9일 04:36
- 감지된 SKILL.md 언어
- 영어
- 스타
- 7
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tools-only/X-Skills --skill terraform-plan-analyze명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | terraform-plan-analyze |
| description | Analyze terraform plan output for risks and cost impact |
| shortcut | tpa |
| category | devops |
| difficulty | advanced |
| estimated_time | 1 minute |
Analyzes terraform plan output to identify risks (resource recreation, data loss, downtime), estimate cost impact, and provide change recommendations.
You are a Terraform plan analysis expert. When user runs /terraform-plan-analyze or /tpa:
Analyze plan output:
Ask user to provide terraform plan output or run:
terraform plan -out=tfplan
terraform show -json tfplan
Categorize changes:
Identify risks:
Estimate cost impact:
Provide recommendation:
## Plan Analysis Summary
**Total Changes:** [N resources]
- Create: [X]
- Update: [Y]
- Replace: [Z]
- Delete: [W]
## Risk Assessment
### Critical Risks ([N])
[List of dangerous changes]
### High Risks ([N])
[List of high-risk changes]
### Medium Risks ([N])
[List of medium-risk changes]
### Safe Changes ([N])
[List of safe changes]
## Cost Impact
**Estimated Monthly Change:** +$X.XX (or -$X.XX)
## Recommendation
[ APPROVE | ️ REVIEW | BLOCK | DANGER]
[Specific advice]
User: /tpa
Plan Output:
Terraform will perform the following actions:
# aws_db_instance.main must be replaced
-/+ resource "aws_db_instance" "main" {
~ arn = "arn:aws:rds:us-east-1:..." -> (known after apply)
- allocated_storage = 100 -> null
+ allocated_storage = 200
~ endpoint = "db.xyz.rds.amazonaws.com:5432" -> (known after apply)
- engine_version = "14.7" -> null
+ engine_version = "15.4" # forces replacement
}
# aws_ecs_service.app will be updated in-place
~ resource "aws_ecs_service" "app" {
~ desired_count = 3 -> 5
}
Plan: 1 to add, 1 to change, 1 to destroy.
Analysis Output:
## Plan Analysis Summary
**Total Changes:** 2 resources
- Create: 1
- Update: 1
- Replace: 1
- Delete: 1
## Risk Assessment
### CRITICAL RISKS (1)
**aws_db_instance.main - REPLACEMENT**
- **Risk:** DATABASE RECREATION = DATA LOSS
- **Reason:** Engine version upgrade from 14.7 → 15.4 forces replacement
- **Impact:**
- All database data will be lost (unless restored from snapshot)
- Downtime during recreation (~10-15 minutes)
- Connection string changes
**Mitigation:**
1. **TAKE SNAPSHOT FIRST:**
```bash
aws rds create-db-snapshot \
--db-instance-identifier mydb \
--db-snapshot-identifier mydb-pre-upgrade-$(date +%Y%m%d-%H%M%S)
Alternative: Blue/Green Deployment
Alternative: In-Place Upgrade (if supported)
aws_ecs_service.app - UPDATE
Estimated Monthly Change:
DANGER - DO NOT APPLY WITHOUT BACKUP
Required Actions Before Apply:
Alternative: Consider blue/green deployment to avoid data loss risk.
DO NOT run terraform apply until backup is verified.
### Example 2: Safe Plan (Adding Resources)
**User:** `/tpa`
**Plan Output:**
Terraform will perform the following actions:
Plan: 2 to add, 0 to change, 0 to destroy.
**Analysis Output:**
```markdown
## Plan Analysis Summary
**Total Changes:** 2 resources
- Create: 2
- Update: 0
- Replace: 0
- Delete: 0
## Risk Assessment
### SAFE CHANGES (2)
**aws_s3_bucket.assets - CREATE**
- **Risk:** None (new resource)
- **Impact:** $0.023/GB storage + $0.09/GB transfer
**aws_cloudfront_distribution.cdn - CREATE**
- **Risk:** None (new resource)
- **Impact:** $0.085/GB CDN transfer
## Cost Impact
**Estimated Monthly Change:**
- S3 bucket (100GB): ~$2.30/month
- CloudFront (500GB): ~$42.50/month
- **Total: ~$45/month**
(Actual cost depends on usage)
## Recommendation
**APPROVE - SAFE TO APPLY**
**Summary:**
- Only creating new resources (no modifications/deletions)
- No risk of data loss or downtime
- Cost increase within expected range
**Proceed with:**
```bash
terraform apply tfplan
### Example 3: Medium Risk (Resource Updates)
**User:** `/tpa`
**Plan Output:**
Terraform will perform the following actions:
~ resource "aws_security_group" "app" { ~ ingress = [ - { from_port = 22 to_port = 22 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] }, + { from_port = 22 to_port = 22 protocol = "tcp" cidr_blocks = ["10.0.0.0/8"] # Restrict SSH }, ] }
~ resource "aws_instance" "app" { ~ instance_type = "t3.medium" -> "t3.large" }
Plan: 0 to add, 2 to change, 0 to destroy.
**Analysis Output:**
```markdown
## Plan Analysis Summary
**Total Changes:** 2 resources
- Create: 0
- Update: 2
- Replace: 0
- Delete: 0
## Risk Assessment
### MEDIUM RISKS (2)
**aws_security_group.app - UPDATE**
- **Change:** Restricting SSH access (0.0.0.0/0 → 10.0.0.0/8)
- **Risk:** May lock out existing SSH connections
- **Impact:**
- Security improvement (good!)
- ️ Ensure your IP is within 10.0.0.0/8 before applying
- ️ Verify VPN or bastion access works
**Verification:**
```bash
# Check your current IP
curl ifconfig.me
# Ensure it's within 10.0.0.0/8 OR you have VPN access
aws_instance.app - UPDATE
Estimated Monthly Change:
️ REVIEW - REQUIRES ATTENTION
Before Applying:
Proceed with:
# Schedule during low-traffic period
terraform apply tfplan
## Pro Tips
**Always run plan before apply**
**Look for -/+ (replacements) - high risk**
**Check if resources are stateful (RDS, S3, EBS)**
**Estimate costs before applying large changes**
**Use terraform show -json for detailed analysis**
## Common Risky Patterns
**Forced Replacements:**
- RDS/Database instances (data loss!)
- S3 buckets (data loss!)
- EBS volumes (data loss!)
**Downtime Causing:**
- EC2 instance replacements
- ECS service recreations
- Load balancer changes
**Review Required:**
- Security group rule changes
- IAM policy modifications
- Network configuration updates