मुख्य सामग्री पर जाएँ
Skillpedia
डिप्लॉय और क्लाउड (DevOps)37k · #7569

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 पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/agentscope-ai/QwenPaw/blob/main/plugins/bundle/cloudpaw/skills/terraform-skill/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

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 resources
  • variables.tf - Input variables
  • outputs.tf - Output values
  • versions.tf - Provider versions
  • data.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

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

computer_use

37k

यह आपके एजेंट को Windows या macOS ऐप को स्क्रीन देखकर, क्लिक करके और हर नतीजे की जाँच करके चलाने देती है, जब कोई सीधा टूल काम न कर सके।

AI और एजेंटएजेंट

browser

37k

यह आपके एजेंट को QwenPaw Browser SDK के ज़रिए असली वेब ब्राउज़र चलाने देती है, पेज पढ़ते, उन पर कार्रवाई करते और सफलता बताने से पहले नतीजे जाँचते हुए।

AI और एजेंटएजेंट

channel_message

37k

यह आपके एजेंट को सही गंतव्य मिलने के बाद किसी खास चैट चैनल या सेशन में एक-तरफ़ा संदेश भेजने देती है, जैसे काम पूरा होने की सूचना।

प्रोडक्टिविटीईमेल और मैसेज

chat_with_agent

37k

यह आपके एजेंट को दूसरी AI एजेंट से दूसरी राय, योजना या समीक्षा के लिए सलाह लेने देती है, और पिछले संदर्भ के साथ वह बातचीत आगे बढ़ाती है।

AI और एजेंटएजेंट

मिलती-जुलती skills