terraform-infrastructure
Comprehensive Terraform infrastructure-as-code skill covering providers, resources, modules, state management, and enterprise patterns for multi-cloud infrastructure
By manutej · 390 installs
npx skills add manutej/luxor-claude-marketplace --skill terraform-infrastructure
Source repository · Upstream listing
Terraform Infrastructure as Code
A comprehensive skill for building, managing, and scaling cloud infrastructure using Terraform. Master declarative infrastructure, multi cloud deployments, state management, module composition, and enterprise grade patterns for AWS, Azure, GCP, and other providers.
When to Use This Skill
Use this skill when:
Provisioning cloud infrastructure across AWS, Azure, GCP, or multi cloud environments
Building reusable infrastructure modules for teams and organizations
Managing infrastructure state across multiple environments (dev, staging, production)
Implementing infrastructure as code (IaC) best practices and governance
Migrating from manual infrastructure to automated, version controlled deployments
Creating repeatable, testable infrastructure configurations
Orchestrating complex multi tier application architectures
Managing Kubernetes clusters, databases, networks, and compute resources
Implementing disaster recovery and multi region deployments
Collaborating on infrastructure changes with teams using GitOps workflows
Core Concepts
Infrastructure as Code Philosophy
Terraform enables declarative infrastructure management:
Declarative Configuration : Define desired state, Terraform handles execution
Immutable Infrastructure : Replace rather than modify infrastructure
Version Control : Track infrastructure changes like application code
Plan Before Apply : Preview changes before execution
Resource Graph : Automatic dependency resolution and parallel execution
State Management : Track real world resources and their configuration
Key Terraform Components
1. Providers : Plugins for infrastructure platforms (AWS, Azure, GCP, Kubernetes, etc.)
2. Resources : Infrastructure objects (VMs, networks, databases, storage)
3. Data Sources : Query existing infrastructure or external data
4. Variables : Parameterize configurations for reusability
5. Outputs : Export values for consumption by other configurations
6. Modules : Reusable, composable infrastructure components
7. State : JSON file tracking managed infrastructure
8. Workspaces : Manage multiple instances of infrastructure
Terraform Workflow
Terraform Language (HCL)
Basic Syntax
HCL (HashiCorp Configuration Language) is declarative and human readable:
Variables and Types
Terraform supports rich type system:
Variable Validation
Add custom validation rules:
Locals and Expressions
Locals compute values once and reuse them:
Functions
Terraform provides built in functions:
Conditional Expressions
Meta Arguments
Resources support special arguments:
Providers
Provider Configuration
Configure infrastructure platforms:
Provider Authentication
Secure authentication methods:
Resources
Resource Declaration
Define infrastructure components:
Resource Lifecycle
Data Sources
Query existing infrastructure or external data:
Modules
Module Structure
Organize code into reusable modules:
Creating a Module
Using Modules
Module Versioning
State Management
Local State
Default state stored locally:
Remote State S3 Backend
Store state in S3 for team collaboration:
Remote State Azure Backend
Remote State GCS Backend
Remote State Terraform Cloud
Remote State Data Source
Read state from another configuration:
Workspaces
Manage multiple environments:
Workspace Based Configuration
Best Practices
Code Organization
Naming Conventions
Security Best Practices
DRY (Don't Repeat Yourself)
Documentation
hcl
module "vpc" {
source = "./modules/vpc"
vpc name = "my vpc"
vpc cidr = "10.0.0.0/16"
availability zones = ["us east 1a", "us east 1b"]
public subnet cidrs = ["10.0.1.0/24", "10.0.2.0/24"]
private subnet cidrs = ["10.0.11.0/24", "10.0.12.0/24"]
}
Testing Infrastructure
Advanced Patterns
Dynamic Backend Configuration
Conditional Resource Creation
Zero Downtime Deployments
Moved Blocks for Refactoring
Import Existing Resources
Skill Version : 1.0.0
Last Updated : October 2025
Skill Category : Infrastructure as Code, Cloud Engineering, DevOps
Compatible With : AWS, Azure, GCP, Kubernetes, Terraform Cloud