terraform-skill
यह क्या करती है
यह स्किल Terraform या OpenTofu से कोड के रूप में इन्फ़्रास्ट्रक्चर पर काम का मार्गदर्शन देती है। यह उन डेवलपर और DevOps इंजीनियरों के लिए है जो क्लाउड संसाधन कोड से प्रबंधित करते हैं।
कब इस्तेमाल करें
- ✓जब आप नया Terraform मॉड्यूल बना रहे हों या मौजूदा कॉन्फ़िगरेशन को दोबारा व्यवस्थित कर रहे हों।
- ✓जब आपको इन्फ़्रास्ट्रक्चर कोड के लिए टेस्ट या CI/CD पाइपलाइन सेट करनी हो।
- ✓जब आप Terraform स्टेट की समस्या ठीक कर रहे हों या सुरक्षा के लिए कॉन्फ़िगरेशन की समीक्षा कर रहे हों।
Skill का लिंक
https://github.com/agentscope-ai/QwenPaw/blob/main/plugins/bundle/cloudpaw/skills/terraform-skill/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे Terraform प्रोजेक्ट में सुरक्षा समस्याएँ जाँचिए और मॉड्यूल की संरचना सुझाइए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह समझाती है कि टेस्ट का तरीका कैसे चुनें, मॉड्यूल कैसे संरचित करें, पाइपलाइन कैसे सेट करें, और trivy व checkov जैसे स्कैन टूल कैसे चलाएँ। कॉन्फ़िगरेशन की समीक्षा या लिखते समय यह ये प्रथाएँ लागू करती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Terraform Skill for Claude
Comprehensive Terraform and OpenTofu guidance covering testing, modules, CI/CD, and production patterns. Based on terraform-best-practices.com and enterprise experience.
When to Use This Skill
Activate this skill when:
- Creating new Terraform or OpenTofu configurations or modules
- Setting up testing infrastructure for IaC code
- Deciding between testing approaches (validate, plan, frameworks)
- Structuring multi-environment deployments
- Implementing CI/CD for infrastructure-as-code
- Reviewing or refactoring existing Terraform/OpenTofu projects
- Choosing between module patterns or state management approaches
Don't use this skill for:
- Basic Terraform/OpenTofu syntax questions (Claude knows this)
- Provider-specific API reference (link to docs instead)
- Cloud platform questions unrelated to Terraform/OpenTofu
Core Principles
1. Code Structure Philosophy
Module Hierarchy:
| Type | When to Use | Scope |
|---|---|---|
| Resource Module | Single logical group of connected resources | VPC + subnets, Security group + rules |
| Infrastructure Module | Collection of resource modules for a purpose | Multiple resource modules in one region/account |
| Composition | Complete infrastructure | Spans multiple regions/accounts |
Hierarchy: Resource → Resource Module → Infrastructure Module → Composition
Directory Structure:
environments/ # Environment-specific configurations
├── prod/
├── staging/
└── dev/
modules/ # Reusable modules
├── networking/
├── compute/
└── data/
examples/ # Module usage examples (also serve as tests)
├── complete/
└── minimal/
Key principle from terraform-best-practices.com:
- Separate environments (prod, staging) from modules (reusable components)
- Use examples/ as both documentation and integration test fixtures
- Keep modules small and focused (single responsibility)
For detailed module architecture, see: Code Patterns: Module Types & Hierarchy
2. Naming Conventions
Resources:
# Good: Descriptive, contextual
resource "aws_instance" "web_server" { }
resource "aws_s3_bucket" "application_logs" { }
# Good: "this" for singleton resources (only one of that type)
resource "aws_vpc" "this" { }
resource "aws_security_group" "this" { }
# Avoid: Generic names for non-singletons
resource "aws_instance" "main" { }
resource "aws_s3_bucket" "bucket" { }
Singleton Resources:
Use "this" when your module creates only one resource of that type:
✅ DO:
resource "aws_vpc" "this" {} # Module creates one VPC
resource "aws_security_group" "this" {} # Module creates one SG
❌ DON'T use "this" for multiple resources:
resource "aws_subnet" "this" {} # If creating multiple subnets
Use descriptive names when creating multiple resources of the same type.
Variables:
# Prefix with context when needed
var.vpc_cidr_block # Not just "cidr"
var.database_instance_class # Not just "instance_class"
Files:
main.tf- Primary resourcesvariables.tf- Input variablesoutputs.tf- Output valuesversions.tf- Provider versionsdata.tf- Data sources (optional)
Testing Strategy Framework
Decision Matrix: Which Testing Approach?
| Your Situation | Recommended Approach | Tools | Cost |
|---|---|---|---|
| Quick syntax check | Static analysis | terraform validate, fmt |
Free |
| Pre-commit validation | Static + lint | validate, tflint, trivy, checkov |
Free |
| Terraform 1.6+, simple logic | Native test framework | Built-in terraform test |
Free-Low |
| Pre-1.6, or Go expertise | Integration testing | Terratest | Low-Med |
| Security/compliance focus | Policy as code | OPA, Sentinel | Free |
| Cost-sensitive workflow | Mock providers (1.7+) | Native tests + mocking | Free |
| Multi-cloud, complex | Full integration | Terratest + real infra | Med-High |
Testing Pyramid for Infrastructure
/\
/ \ End-to-End Tests (Expensive)
/____\ - Full environment deployment
/ \ - Production-like setup
/________\
/ \ Integration Tests (Moderate)
/____________\ - Module testing in isolation
/ \ - Real resources in test account
/________________\ Static Analysis (C
अक्सर पूछे जाने वाले सवाल
क्या यह बुनियादी Terraform सिंटैक्स सिखाती है?
नहीं। यह बुनियादी सिंटैक्स के बजाय टेस्टिंग, मॉड्यूल, CI/CD और आर्किटेक्चर के फ़ैसलों पर केंद्रित है।
क्या यह OpenTofu के साथ काम करती है?
हाँ। स्किल Terraform और OpenTofu दोनों कवर करती है।
यह कौन-से सुरक्षा टूल बताती है?
इन्फ़्रास्ट्रक्चर कोड में सुरक्षा समस्याएँ स्कैन करने के लिए trivy और checkov।
जानकारी
लेखक का मूल विवरण
Use when working with Terraform or OpenTofu - creating modules, writing tests (native test framework, Terratest), setting up CI/CD pipelines, reviewing configurations, choosing between testing approaches, debugging state issues, implementing security scanning (trivy, checkov), or making infrastructure-as-code architecture decisions
repo: agentscope-ai/QwenPaw
लोकप्रियता
- GitHub स्टार
- 37k
- रैंकिंग में स्थान
- #7569
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
computer_use
37kयह आपके एजेंट को Windows या macOS ऐप को स्क्रीन देखकर, क्लिक करके और हर नतीजे की जाँच करके चलाने देती है, जब कोई सीधा टूल काम न कर सके।
browser
37kयह आपके एजेंट को QwenPaw Browser SDK के ज़रिए असली वेब ब्राउज़र चलाने देती है, पेज पढ़ते, उन पर कार्रवाई करते और सफलता बताने से पहले नतीजे जाँचते हुए।
channel_message
37kयह आपके एजेंट को सही गंतव्य मिलने के बाद किसी खास चैट चैनल या सेशन में एक-तरफ़ा संदेश भेजने देती है, जैसे काम पूरा होने की सूचना।
chat_with_agent
37kयह आपके एजेंट को दूसरी AI एजेंट से दूसरी राय, योजना या समीक्षा के लिए सलाह लेने देती है, और पिछले संदर्भ के साथ वह बातचीत आगे बढ़ाती है।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।