AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Infrastructure As Code Patterns

skill-sethdford-claude-skills-infrastructure-as-code-patterns · by sethdford

Codify infrastructure with Terraform, CloudFormation, or Pulumi. Design IaC architecture, versioning, testing, and drift detection. Use when automating infrastructure or establishing IaC practices.

No reviews yet
0 installs
49 views
0.0% view→install

Install

$ agentstack add skill-sethdford-claude-skills-infrastructure-as-code-patterns

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-sethdford-claude-skills-infrastructure-as-code-patterns)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
6mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Infrastructure As Code Patterns? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Infrastructure-as-Code Patterns

Define and manage infrastructure through code for reproducibility, version control, and automation.

Context

You are building infrastructure-as-code practices. Choose tools, design module structure, plan testing and validation, implement drift detection. Read current infrastructure, team programming skills, and cloud platform.

Domain Context

Based on IaC best practices (Terraform, CloudFormation, Pulumi):

  • Declarative vs Imperative: Declare desired state (Terraform) vs describe steps (CloudFormation). Declarative is more maintainable.
  • Modularity: Reusable modules (VPC, database, load balancer); parameterized for different environments
  • State Management: Terraform state tracks infrastructure; must be versioned and backed up
  • Testing: Unit tests (validate syntax), integration tests (deploy to staging), policy tests (compliance)
  • Drift Detection: Find manual changes not in code; reconcile or remediate

Instructions

  1. Choose Tool: Terraform (multi-cloud, popular, large ecosystem). CloudFormation (AWS-native, less learning). Pulumi (programming language, more flexible).
  1. Design Module Structure: Root modules per environment (dev, staging, prod). Shared modules for common patterns (VPC, RDS cluster, service). Versioned modules in registry.
  1. Plan State Management: Store state in remote backend (S3 + DynamoDB for Terraform). Enable versioning and locking. Restrict access (IAM for AWS state). Never commit state to Git.
  1. Implement Testing: Validate syntax (terraform fmt). Unit tests (mock resources). Integration tests (deploy to ephemeral environment, test behavior). Destroy after test.
  1. Detect and Handle Drift: Use terraform plan to detect changes not in code. Use policy as code (Sentinel, OPA) to enforce compliance. Periodically reconcile drift.

Anti-Patterns

  • One Monolithic Module: All infrastructure in single file. Result: hard to understand, reuse, test. Guard: Break into modules; each module responsible for logical unit.
  • State Committed to Git: Store state in version control. Result: leaks credentials, creates merge conflicts. Guard: Remote state backend; ignore .tfstate in Git.
  • No Testing: Deploy to production first time. Result: broken infrastructure. Guard: Test in ephemeral environment; validate before production.
  • Ignoring State Locking: Multiple people apply changes simultaneously. Result: state corruption. Guard: Use remote backend with locking; enforce plan review before apply.

Further Reading

  • Terraform: Up and Running by Yevgeniy Brikman — foundational IaC patterns
  • Infrastructure as Code by Kief Morris — IaC principles and practices
  • Pulumi Documentation — multi-language IaC approach

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.