Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill terraform-iac명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | terraform-iac |
| description | > Use when this capability is needed. |
"If you can't reproduce your infrastructure from code, it's not infrastructure."
Invoked when provisioning cloud infrastructure. Generates Terraform modules following best practices for state management, security, and reusability.
Steps:
terraform/
├── main.tf # Resource definitions
├── variables.tf # Input variables
├── outputs.tf # Output values
├── providers.tf # Provider configuration
├── versions.tf # Terraform and provider version constraints
└── terraform.tfvars # (gitignored) Environment-specific values
Steps:
terraform.tfstate or .tfvars with secrets.Steps:
environments/
├── dev/
│ ├── main.tf → ../../modules/
│ └── terraform.tfvars
├── staging/
└── production/
Steps:
tfsec or checkov to scan for misconfigurations.terraform plan in CI, require approval for apply.| Field | Type | Description |
|---|---|---|
modules | string[] | Generated Terraform module files |
env_configs | string[] | Environment-specific configurations |
state_config | string | Backend configuration |
scan_results | string | Security scan output |
terraform plantfsec, checkov, or trivy configci-pipeline; this skill produces the IaC files the pipeline deploys)kubernetes-helm)terraform.tfstate, .tfvars files with secrets, or provider credentials to version control.apply operation.versions.tf to prevent unexpected upgrades.project, environment, managed-by=terraform.terraform fmt and terraform validate before committing any changes.tfsec / checkov) on every change; do not merge with unresolved critical findings.data sources to reference existing resources — never recreate resources managed outside this configuration.sensitive = true and must never appear in plan output or logs.terraform plan output review in CI before any terraform apply execution.| Situation | Action |
|---|---|
| Single cloud provider, simple project | Use flat module structure with terraform.workspace for env separation |
| Multi-environment with divergent configs | Use directory-per-environment pattern with shared modules |
| Many environments with DRY config needs | Recommend Terragrunt for hierarchical variable inheritance |
| Existing resources not managed by IaC | Use terraform import and generate corresponding resource blocks |
Drift detected in terraform plan | Investigate cause; if intentional manual change, update code to match; if accidental, apply to restore |
| Module is reused across 3+ projects | Publish module to a private registry with semantic versioning |
| Security scanner reports critical finding | Block merge; remediate finding before proceeding |
| State file is corrupted or locked | Use terraform force-unlock (with caution); restore state from backup if corrupted |
| Provider needs upgrading | Pin new version in versions.tf; run terraform init -upgrade; review plan for breaking changes |
terraform validate and terraform fmt checksterraform plan shows expected changes with zero unexpected resource modificationstfsec/checkov) reports zero critical findingsproject, environment, and managed-by labelsvariables.tf and outputs.tf with descriptions for every variablesensitive = true and excluded from logs| Failure | Symptom | Mitigation |
|---|---|---|
| State lock contention | terraform apply fails with "state locked by another process" | Verify no other apply is running; use terraform force-unlock <lock-id> as last resort |
| State drift | terraform plan shows unexpected changes to resources | Run terraform refresh; compare with cloud console; update code or apply to reconcile |
| Provider version incompatibility | terraform init fails or plan shows deprecated resource arguments | Pin compatible provider version in versions.tf; consult provider changelog |
| Secrets committed to repo | .tfvars with credentials appears in git history | Rotate compromised credentials immediately; use git filter-branch or BFG to purge; move secrets to vault |
| Circular module dependency | terraform validate reports cycle in module references | Refactor modules to break circular dependency; use data sources for cross-module references |
| Resource already exists | apply fails with "resource already exists" error | Import existing resource with terraform import; add matching resource block |
| Insufficient permissions | apply fails with "access denied" on resource creation | Verify IAM role/policy attached to Terraform execution identity; follow least-privilege principle |
[timestamp] module-generated: Created Terraform module at <path> for <resource-type> on <provider>[timestamp] state-backend-configured: Set up <backend-type> backend with encryption=<bool>, locking=<bool>[timestamp] environment-created: Generated environment config for <env-name> using <separation-strategy>[timestamp] drift-detected: terraform plan shows <n> unexpected changes in <environment>[timestamp] security-scanned: Ran <scanner> — <critical> critical, <high> high findings[timestamp] resource-imported: Imported <resource-type>.<resource-name> with ID <resource-id>[timestamp] plan-approved: terraform plan reviewed and approved for <environment> with <n> changesSource: dhruvinrsoni/agentskills-garden — distributed by TomeVault.