/spicy-skills:terraform-developmentfrom spicy-skills
Guides Terraform/HCL configuration structure, module design, state management, and provider usage. Use when designing infrastructure, planning Terraform architecture, or writing .tf files.
Ships in spicy-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Expert assistance for Terraform infrastructure as code, from basic configurations to enterprise-scale deployments.
For immediate tasks, use these common patterns:
Create a basic resource:
resource "google_compute_instance" "example" {
name = "example-instance"
machine_type = var.machine_type
zone = var.zone
boot_disk {
initialize_params {
image = var.image
}
}
network_interface {
network = "default"
}
labels = {
environment = var.environment
}
}
Define a variable with validation:
variable "environment" {
type = string
description = "Deployment environment (dev, staging, prod)"
validation {
condition = contains(["dev", "staging", "prod"], var.environment)
error_message = "Environment must be dev, staging, or prod."
}
}
terraform fmt and terraform validateterraform plan to preview changesterraform apply after approvalexamples/Single configuration vs Modules:
State management:
terraform {
backend "gcs" {
bucket = "my-terraform-state"
prefix = "prod/terraform.tfstate"
}
}
module "vpc" {
source = "terraform-google-modules/network/google"
version = "~> 9.0"
project_id = var.project_id
network_name = "my-vpc"
subnets = [
{
subnet_name = "subnet-01"
subnet_ip = "10.10.10.0/24"
subnet_region = "us-central1"
},
{
subnet_name = "subnet-02"
subnet_ip = "10.10.20.0/24"
subnet_region = "us-central1"
}
]
}
resource "google_compute_firewall" "example" {
name = "example-firewall"
network = var.network_name
dynamic "allow" {
for_each = var.firewall_rules
content {
protocol = allow.value.protocol
ports = allow.value.ports
}
}
source_ranges = var.source_ranges
}
Comprehensive module development: See module_development.md Project structure patterns: See project_structure.md Testing strategies: See testing.md State management: See state_management.md Security and secrets: See security.md
Initialize: terraform init - Download providers and modules
Format: terraform fmt -recursive - Format all .tf files
Validate: terraform validate - Check syntax
Plan: terraform plan -out=tfplan - Preview changes
Apply: terraform apply tfplan - Execute changes
Destroy: terraform destroy - Remove all managed resources
Debug: TF_LOG=DEBUG terraform plan - Enable detailed logging
Follow these patterns for consistency:
Resources: <resource_type>.<descriptive_name> (lowercase with underscores)
google_compute_instance.web_servergoogle_compute_instance.WebServer or google_compute_instance.gcp-web-serverVariables: Descriptive nouns (singular for single values, plural for lists)
machine_type, zonesmachineType, zModules: Verb or noun phrases with hyphens
terraform-google-vpc, network-moduleVPC_Module, network_1terraform fmt and terraform validaterequired_version and provider versionsterraform plan outputState locked: Someone else is running Terraform, or previous run failed
Provider version conflict: Different versions required
required_providers blockterraform init -upgrade if intentional updateResource already exists: Resource exists but not in state
terraform import to add existing infrastructureCycle error: Circular dependency detected
depends_on sparingly and explicitlyFor detailed debugging, see troubleshooting.md
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub d-mariano/spicyclaude --plugin spicy-skills3 skills in this plugin
/python-developmentEnforces Python best practices for typing, structure, and tooling during both planning and implementation. Use when designing, planning, or writing Python code, modules, APIs, or applications. Triggers: 'python', 'pytest', 'pydantic', 'dataclass', 'fastapi', 'django', 'flask', 'uv', 'poetry', 'ruff', 'mypy', '.py files', planning a Python service, designing Python architecture. Does not apply to pure shell scripts, Jupyter notebook exploration, config-only YAML/JSON edits, or non-Python languages.
/test-driven-developmentEnforces test-driven development via RED-GREEN-REFACTOR when writing code. Use when implementing features, fixing bugs, refactoring, or writing any functional code. Triggers: 'write tests first', 'TDD', 'test-driven', 'red-green-refactor', new feature, bug fix, refactor. Does not apply to pure config files (JSON, YAML, .env), type-only definitions, or documentation.