infrastructure-as-code

Implements Terraform, CloudFormation, and Pulumi configurations following infrastructure-as-code best practices.

Updated Sep 2, 2026
One-click install
npx skills add https://github.com/Dazlarus/karl-code --skill infrastructure-as-code-dazlarus
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: infrastructure-as-code
Source: https://github.com/Dazlarus/karl-code/tree/main/.agents/skills/infrastructure-as-code
Command: npx skills add https://github.com/Dazlarus/karl-code --skill infrastructure-as-code-dazlarus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing cloud infrastructure by hand through consoles leads to inconsistent, unreproducible environments. This Skill guides the creation of maintainable infrastructure-as-code with proper state management, modular design, and input validation across Terraform, CloudFormation, and Pulumi. ## Core Features & Use Cases - Terraform Patterns: Remote state with locking, reusable modules, naming conventions, variable validation, and explicit dependency management. - Multi-Environment Strategy: Environment-specific variable files and workspaces for dev, staging, and prod deployments. - Pulumi & CloudFormation: Component resources in Python and CloudFormation templates with mappings and parameters. - Use Case: You need to provision a VPC with public subnets across three environments. The Skill provides a reusable Terraform module with validated inputs, consistent tagging, and remote S3 state with DynamoDB locking. ## Quick Start Write a Terraform module for a VPC with public subnets that uses remote S3 state and works across dev and prod environments.

Frequently Asked Questions about infrastructure-as-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage Terraform state for team environments?▼

Use a remote backend such as S3 with encryption enabled and DynamoDB for state locking. This prevents concurrent modifications from corrupting state and keeps sensitive state data off local machines.

How to structure Terraform modules for reuse?▼

Define input variables with descriptions and validation rules, create resources with consistent naming via locals, and expose outputs like vpc_id and subnet IDs. Consume the module from environment-specific directories that pass different variable values.

Terraform vs Pulumi vs CloudFormation for infrastructure as code?▼

Terraform uses HCL with a large provider ecosystem and mature state management. Pulumi lets you write infrastructure in general-purpose languages like Python using component resources. CloudFormation is AWS-native with mappings and parameters but is limited to AWS.

How do I validate Terraform variable inputs?▼

Add validation blocks to variable definitions using conditions like regex matching or contains checks against allowed values. Invalid values fail at plan time with a custom error message before any resources are created.

When should I not use infrastructure as code?▼

Skip IaC for one-off simple resource creation where the cloud console is faster, and for application deployment or container orchestration, which belong to CI/CD and containerization workflows instead.