iac-terraform

Enforce consistent Terraform infrastructure practices with state locking and pre-apply plan review.

1|Updated Jun 24, 2026
One-click install
npx skills add https://github.com/eric-sabe/engsys --skill iac-terraform-eric-sabe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iac-terraform
Source: https://github.com/eric-sabe/engsys/tree/main/stacks/iac/terraform/skills/iac-terraform
Command: npx skills add https://github.com/eric-sabe/engsys --skill iac-terraform-eric-sabe

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the common pain points of unmanaged Terraform workflows, including state corruption, unrecoverable failed applies, unplanned production drift from out-of-band changes, and inconsistent infrastructure across environments.

Core Features & Use Cases

  • End-to-end Terraform best practices: Covers state management, module design, workspace configuration, plan/apply gating, and drift detection for production-grade infrastructure.
  • Troubleshooting guidance: Provides actionable steps for resolving common Terraform failures including partial applies, API throttling, provider auth issues, and stale state locks.
  • Use Case: For example, when preparing to deploy changes to a production Terraform environment, use this Skill to follow the required pre-apply review pipeline, confirm no unintended resource replacements or data loss, and safely resolve any detected drift before running apply.

Quick Start

Use the iac-terraform skill to review your Terraform plan for unintended resource replacements or data loss before executing any apply command.

Frequently Asked Questions about iac-terraform

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

FAQPage Schema
How do I prevent Terraform state corruption during production deployments?

To prevent Terraform state corruption, enforce remote state configuration with state locking, version pinning, and mandatory pre-apply plan review pipelines. This ensures no unintended resource replacements or data loss occur before executing apply commands.

What is the best way to detect and resolve unplanned Terraform infrastructure drift?

Detecting unplanned Terraform infrastructure drift involves applying consistent drift detection mechanisms within your workflow. You resolve this drift by identifying out-of-band changes and safely synchronizing the state before proceeding with any infrastructure deployments.

How do I recover from a failed Terraform apply without corrupting my state?

Recovering from a failed Terraform apply without corrupting state requires standardized troubleshooting for partial applies. This includes safely resolving stale state locks, API throttling issues, and provider authentication failures before retrying the operation.

Does this Terraform workflow approach support workspace management for multiple environments?

Yes, this Terraform workflow approach supports workspace management across multiple environments by enforcing consistent infrastructure as code practices. It standardizes module development and workspace configuration to ensure reproducible, safe deployments across different environments.

Why does my Terraform plan show unintended resource replacements before applying?

Unintended resource replacements in a Terraform plan typically occur due to unplanned production drift or inconsistent module versioning. Reviewing the pre-apply plan carefully and resolving detected drift ensures no unexpected data loss happens during apply.

Can I use this approach to troubleshoot Terraform provider authentication issues?

Yes, you can use this approach to troubleshoot Terraform provider authentication issues. The workflow provides actionable steps for resolving common Terraform failures including provider auth issues, API throttling, and stale state locks.