소스 정보
- 저장소
- tomevault-io/skills-registry
- 최근 소스 활동
- 2026년 7월 3일 19:45
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill terraform-refactoring명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | terraform-refactoring |
| description | >- Use when this capability is needed. |
Turns architecture changes into reviewable, incremental plans. Pair with terraform-core for
syntax of moved/import and terraform-state for CLI surgery fallback.
Communicate renames to Terraform without state mv:
moved {
from = aws_lambda_function.imu
to = module.compute.aws_lambda_function.imu
}
Order matters in complex chains; combine with PR notes explaining blast radius.
Stop managing something but leave it running:
removed {
from = aws_s3_bucket.legacy_tmp
lifecycle {
destroy = false
}
}
Document who owns lifecycle going forward - otherwise you accumulate orphans nobody understands.
Bring existing resources into code with review:
import {
to = aws_kinesis_stream.imu_ingest
id = "arn:aws:kinesis:us-east-1:111111111111:stream/prod-imu-ingest"
}
resource "aws_kinesis_stream" "imu_ingest" {
name = "prod-imu-ingest"
stream_mode_details {
stream_mode = "ON_DEMAND"
}
}
Validate import ID format per resource docs - typos cause confusing partial imports.
moved blocks mapping old addresses to module.foo.*.terraform plan should show no-op; if not, fix addresses before apply.Usually harder - watch for_each key changes. Sometimes migrate in two phases: create parallel resources, cut traffic, destroy old (expensive). Prefer feature flags in applications to tolerate duplicate infra briefly.
Terraform considers resource name changes as destroy/create. Use moved or state mv to keep
identity.
lifecycle { create_before_destroy = true } where supported.Force replacement when tangential resources change (e.g., launch template version) - see terraform-core.
plan -refresh-only to align state with actual.state rm.For risky PRs, include Risk, Rollback, Customer impact, Monitoring - even infra-only changes deserve this to align SRE.
Terraform lacks auto rollbacks - keep previous git tag and plan.bin artifact for supervised
terraform apply of older revision when safe.
Avoid mixing provider major bumps with big refactors - separate PRs reduce unknowns when plans explode.
Run terraform test with mocks + integration plan in staging workspace with copied state (where
permitted).
Targeting masks missing dependencies - acceptable temporarily, not as a lifestyle.
Refactor one axis per PR: names OR module split OR provider bump - not all three simultaneously.
Add temporary dashboards measuring error rates; if Terraform swap correlates with spikes, pause and rollback per playbook.
Some refactors need aws_db_instance snapshot before replace - Terraform orchestrates snapshot
identifier attributes where supported; otherwise use runbook-managed snapshots.
Before apply, terraform state pull to timestamped object - store encrypted.
If apply fails mid-way, do not immediately re-apply - read error, check partial resources, consult
terraform plan for remainder; sometimes refresh needed.
When multiple squads touch shared modules, freeze interface changes during critical business windows (Black Friday, quarter close).
Update architecture diagrams in the same PR as refactors - reviewers catch mistaken moved targets
faster with visuals.
Mystery errors → terraform-troubleshooting. Secrets handling → terraform-secrets.
If you must change map keys, use temporary moved chains or accept one-time recreation - plan cost with
owners.
Compute expression outcomes (merge of tags) in console to predict plan noise before editing dozens
of files.
Refactors that replace SKUs (RI commitments) need finance ack - Terraform changes have dollar sequelae.
Delete dead variables/outputs after migration completes; dead API surfaces confuse module users.
Track remaining FIXME moved blocks in backlog; temporary scaffolding ossify into permanent risk.
Disciplined refactors feel slow - fast merges that skip planning cause weekend outages that cost more than patience ever would.
moved/import with comments.When refactors touch compliance controls, attach plan files (sanitized) to change tickets - auditors prefer deterministic evidence over oral summaries.
Run terraform graph | dot -Tsvg for large systems sparingly - visualizations help explain why certain
resources must move together; archive SVGs in design docs for onboarding.
Sometimes module split requires two-phase delivery: deploy new remote state outputs before switching consumers - coordinate PR merges across repos with a shared checklist.
If refactor needs ETL (S3 object rewrite, Dynamo scans), assign explicit DBA/data engineer owners; Terraform provisions buckets, scripts run elsewhere - blur causes half-migrated datasets.
Streaming systems (Kinesis/Pub/Sub) may need schema registry updates separate from Terraform - note dependencies in PR body so consumers deploy coordinated releases.
When renaming resources risks billingAllocation tags shifting, notify FinOps before apply - they may need to remap chargeback rules.
After refactor, verify CloudWatch log groups / alarms still reference correct ARNs - grep for old log group names in dashboards JSON.
Occasionally destroy/create is cheaper/safer than clever moved gymnastics (ephemeral caches).
Document customer impact windows honestly.
Refactoring is risk management dressed as code shuffling - treat it with the seriousness of a prod deploy, because it is one.
If using Terraform Cloud, queue refactors behind feature work when using same workspace - serialized runs avoid conflicting state versions; communicate queue expectations in Slack.
Refactors tested locally with local backend may behave differently on remote exec due to env
vars - mirror CI variables in .envrc or documented shells.
Set CODEOWNERS paths for moved/import heavy directories so platform seniors always review - junior
edits to migration blocks are high risk.
Run tflint --fix cautiously - auto-fix altering comments or ordering can obscure subtle diffs; prefer
explicit human formatting commits.
After refactor, terraform plan should be calmer (fewer tangled replaces). Track plan line
count metrics over weeks - spikes warrant retros.
For uncertain migrations, clone workspace with copied state subset (where safe) to rehearse; destroy canary after - some orgs forbid state copying; respect policy.
Temporary var.enable_legacy_resource booleans help gradual migration - delete toggles once stable to
avoid permanent complexity.
Store Architecture Decision Records beside code referencing WHY moved blocks exist - future teams won’t
reverse refactors safely without rationale.
Pair senior+junior on first refactor PR after onboarding - reading moves is easier with narration.
If refactor causes incident, capture signals that plans underplayed risk - improve checklists, not individuals.
Pre-commit hook blocking terraform destroy without ALLOW_DESTROY=1 env var prevents accidents
during local experimentation - trivial to bypass intentionally, but stops muscle-memory mistakes.
Multi-week refactors need executive summaries monthly - translate technical milestones into business risk reduction language.
Validate dashboards, on-call playbooks, and customer status pages reference new resource names - human docs lag Terraform easily.
When splitting modules, publish temporary duplicate outputs (legacy_alb_dns, alb_dns) until
downstream stacks cut over - communicate deprecation timelines in Slack #infra-announce.
Terragrunt dependency outputs may reorder applies - verify mock_outputs during refactor windows - see
terraform-terragrunt.
Before merging, grep -R 'aws_lambda_function.imu' -n to catch lingering documentation snippets
pointing to old addresses - confuses operators during incidents.
If plan time doubles due to expanded graphs, consider splitting stacks rather than micro-optimizing expressions - time is money in CI.
When expecting destroys, copy plan JSON to spreadsheet highlighting each destroy with owner sign-off - no mass “LGTM” on thousand-line destroys.
Give sample CloudWatch queries / traces showing successful behavior post-refactor - evidence calms nervous partners faster than Terraform alone.
Some datasets cannot be destroyed - prevent_destroy alone insufficient; legal may require retaining
specific buckets - note holds in module README to block naive destroys.
Sleep on gigantic refactors; fresh eyes catch missing moved blocks better than caffeinated 2 AM
eyes - schedule reviews with timezone diversity when feasible.
Celebrate successful refactors briefly - teams that only spotlight outages under-invest in incremental hygiene; a quick kudos message reinforces discipline.
Archive plan JSON line counts before/after refactors - even if imperfect, trending downward signals simpler systems worth sustaining.
Capture Terraform CLI and provider versions in those archives - forensics without version context misattributes regressions to the wrong commit.
Source: eclosion-labs/terraform-cursor-plugin — distributed by TomeVault.