terraform-state-manager

Import, move, and remove Terraform state with non-destructive workflows.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ksrae/tag-diary-app --skill terraform-state-manager-ksrae
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-state-manager
Source: https://github.com/ksrae/tag-diary-app/tree/main/.agents/skills/terraform-state-manager
Command: npx skills add https://github.com/ksrae/tag-diary-app --skill terraform-state-manager-ksrae

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a safe, auditable workflow for Terraform state operations, preventing drift and accidental data loss during import, state moves, removals, and backend migrations.

Core Features & Use Cases

  • Import existing resources into Terraform state with minimal disruption.
  • Move resources between modules or rename them without destroying resources.
  • Remove resources from Terraform management while keeping them running.
  • Migrate state between backends (local, S3, GCS) with validation via plan.

Quick Start

Back up your state, then perform a minimal import for a single resource to begin.

Frequently Asked Questions about terraform-state-manager

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

FAQPage Schema
How do I safely move Terraform resources between modules without destroying infrastructure?

Terraform state moves allow you to rename or relocate resources between modules without destroying the underlying infrastructure. This non-destructive workflow requires a state backup and immediate planning to verify zero drift.

What is the best way to import existing cloud resources into Terraform state?

Importing existing resources into Terraform state maps existing infrastructure to your configuration with minimal disruption. You must back up your state first, then perform a minimal import for a single resource and run a plan to validate.

How do I migrate Terraform backend from local to S3 without losing state data?

Migrating Terraform backend from local to S3 requires a validated state migration workflow. You reconfigure the backend, pull the current state, and push it to the new backend, finishing with a plan to ensure the migration is lossless.

Can I remove a resource from Terraform state management while keeping it running?

Yes, you can remove a resource from Terraform state management while keeping it running. This state removal workflow disassociates the resource from Terraform without destroying the physical infrastructure, allowing it to continue operating independently.

What precautions are needed to prevent conflicts during Terraform state refactoring?

To prevent conflicts during Terraform state refactoring, you must enforce team coordination, create state backups before changes, and apply incremental changes. Running an immediate plan after modifications confirms no drift or unexpected changes occurred.