infrastructure-iac

Author and review Infrastructure as Code across Terraform, Docker, Ansible, and CloudFormation.

15|2|Updated Dec 13, 2025
One-click install
npx skills add https://github.com/d-padmanabhan/agent-engineering-handbook --skill infrastructure-iac-d-padmanabhan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: infrastructure-iac
Source: https://github.com/d-padmanabhan/agent-engineering-handbook/tree/main/skills/infrastructure-iac
Command: npx skills add https://github.com/d-padmanabhan/agent-engineering-handbook --skill infrastructure-iac-d-padmanabhan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you write safer, more reliable Infrastructure as Code by reducing common mistakes in Terraform, Docker, Ansible, and CloudFormation—especially around security defaults, reproducibility, and stateful operations.

Core Features & Use Cases

  • Security-first IaC guidance: non-root/container hardening, minimal images, secret-handling practices, and protection of Terraform state.
  • Reproducible, deterministic implementations: pinned versions and validated inputs to avoid drift and brittle builds.
  • Practical engineering patterns: stable Terraform addressing (prefer for_each), multi-stage Docker builds, and modular Ansible structure and idempotent tasks.
  • Use Case: When onboarding a new infrastructure project, apply consistent conventions to Terraform + Docker + Ansible + CloudFormation so an agent can propose changes that pass review and minimize rollback risk.

Quick Start

Use the infrastructure-iac skill to generate a secure-by-default Terraform+Docker plan for a new environment and include state-safety, version pinning, and non-root container guidance for the proposed files.

Frequently Asked Questions about infrastructure-iac

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

FAQPage Schema
How do I secure Terraform state and handle secrets in Infrastructure as Code?

Securing Infrastructure as Code requires safeguarding Terraform state and applying secret-handling practices to prevent unauthorized access or accidental exposure during provisioning workflows.

What is the best way to write reproducible Terraform and Docker configurations?

Reproducible Infrastructure as Code relies on deterministic practices like pinned versions, stable resource addressing with for_each, and multi-stage Docker builds to minimize drift and brittle builds.

How do I harden Docker containers using Infrastructure as Code practices?

Docker container hardening involves using minimal base images and non-root user configurations to reduce attack surfaces and enforce security defaults during containerization automation.

Can I use this to generate secure-by-default CloudFormation templates for AWS?

Yes, it provides guidance for AWS-native CloudFormation template updates, ensuring infrastructure automation tasks like provisioning include validated inputs and consistent security conventions.

Why should I use for_each instead of count for stable Terraform resource patterns?

Using for_each creates stable Terraform resource addressing, preventing accidental resource recreation and reducing rollback risk compared to count when managing dynamic infrastructure as code.

How do I structure idempotent Ansible tasks for configuration management?

Structuring modular Ansible tasks with idempotency ensures configuration management operations apply consistently without unintended side effects during repeated infrastructure automation runs.