● Communauté
LukasNiessen
⚡ Instantané
terrashark
par LukasNiessen · LukasNiessen/terrashark
Terraform skill that actually follows HashiCorp best practices — eliminates LLM hallucinations with grounded, modular IaC.
TerraShark prevents the common Claude failure mode of hallucinated Terraform resource arguments by grounding generation in official HashiCorp best practices. Biases toward modular code, sensible state layout, and security defaults. Good for greenfield IaC and for fixing up LLM-generated Terraform that doesn't terraform plan cleanly.
Pourquoi l'utiliser
Fonctionnalités clés
- Grounded in HashiCorp Terraform best practices
- Eliminates hallucinated resource arguments
- Modular structure by default (modules/, envs/)
- Security-first defaults (least privilege, encryption on)
- State layout guidance (remote backend, workspace patterns)
- Works with Claude Code and Codex
Démo en direct
Aperçu en pratique
terrashark-skill.replay
▶ prêt
Cas d'usage
Usages concrets : terrashark
Quand l'utiliser : Day one of a new AWS account; you want a VPC module that won't embarrass you in 6 months.
Déroulement
-
Generate module
Use terrashark. AWS VPC module, 3 AZs, public + private + db subnets, NAT gateways per AZ, flow logs on.✓ Copié
→ Module with variables.tf, main.tf, outputs.tf — no hallucinated args
-
Add security defaults
Ensure default security group denies all, flow logs go to CloudWatch with KMS-CMK encryption.✓ Copié
→ Security group + logging + KMS wired
-
Validate
Run terraform init + validate + plan with example tfvars.✓ Copié
→ Clean plan output, no errors
Résultat : A VPC module that terraform validates clean and follows AWS best practices.
Pièges
- LLM suggests deprecated aws_vpc_endpoint arg — TerraShark grounds in current docs; if drift still happens, ask it to cite the HashiCorp page
- Module too monolithic — Ask for split: networking module vs. endpoints module separately
Quand l'utiliser : Another LLM gave you Terraform that looks reasonable but terraform plan fails on unknown arguments.
Déroulement
-
Point at the broken file
terraform plan fails on modules/rds. Use terrashark to fix each invalid argument with the current correct form.✓ Copié
→ Per-error fix with HashiCorp doc reference
-
Validate
Re-run plan; if any errors remain, iterate.✓ Copié
→ Clean plan
Résultat : A file that plans clean.
Quand l'utiliser : You have dev + staging + prod and one giant terraform.tfstate.
Déroulement
-
Propose layout
Design S3 remote backend with per-env state files and DynamoDB locking. 3 envs.✓ Copié
→ Backend config per env with key separation + locking
-
Migration plan
Plan the migration from a single local state to this layout, step by step.✓ Copié
→ terraform state mv steps + safety checkpoints
Résultat : A state layout you can migrate to without losing state.
Pièges
- Accidentally deleting state during migration — Always pull and back up state files before any mv operation
Combinaisons
Associez-le à d'autres MCPs pour un effet X10
AWS skill sizes architecture, TerraShark implements IaC
Design the architecture with aws-skill, implement as Terraform with terrashark.✓ Copié
Security-review the generated IaC
After terrashark scaffolds the module, run OWASP security review on the IAM and networking blocks.✓ Copié
Coût et limites
Coût d'exécution
- Quota d'API
- None
- Tokens par appel
- 10-30k per module
- Monétaire
- Free
- Astuce
- Generate module by module, not whole environment in one shot.
Sécurité
Permissions, secrets, portée
Stockage des identifiants : No credentials. TerraShark doesn't run terraform apply itself.
Sortie de données : Prompts go to Claude. Terraform plan/apply hits your cloud provider using your local creds.
- Always review generated IAM policies before apply. LLMs can silently over-grant.
Dépannage
Erreurs courantes et correctifs
terraform validate fails on unknown argument
Ask TerraShark to reconcile against the current provider doc URL; provider version may be newer than the skill's prompt context.
Vérifier : terraform providers
Plan creates unwanted destroys
Usually state-drift or implicit renaming. Run terraform plan -target to isolate before apply.
Alternatives
terrashark vs autres
| Alternative | Quand l'utiliser | Compromis |
| Hand-writing with official docs open | You know the provider deeply | Slower |