terraform-state-manager

Manage Terraform state operations including import, move, remove, and backend migration.

29|7|Updated Oct 13, 2025
One-click install
npx skills add https://github.com/armanzeroeight/fastagent-plugins --skill terraform-state-manager-armanzeroeight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-state-manager
Source: https://github.com/armanzeroeight/fastagent-plugins/tree/main/plugins/terraform-toolkit/skills/terraform-state-manager
Command: npx skills add https://github.com/armanzeroeight/fastagent-plugins --skill terraform-state-manager-armanzeroeight

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a structured and safe approach to managing Terraform state, addressing common issues like importing resources, refactoring state, removing resources without destruction, and migrating backends.

Core Features & Use Cases

  • Import Existing Resources: Bring unmanaged infrastructure under Terraform control.
  • Move/Rename Resources: Safely refactor resource addresses or move them between modules.
  • Remove from State: Detach resources from Terraform management without destroying them.
  • Migrate Backends: Transition state storage from local to remote (e.g., S3).
  • Use Case: You need to rename an AWS S3 bucket resource in your Terraform code and ensure the actual S3 bucket in AWS is updated accordingly without downtime.

Quick Start

Use the terraform-state-manager skill to import the existing AWS S3 bucket named 'my-old-bucket' into your Terraform configuration as 'aws_s3_bucket.new_bucket'.

Frequently Asked Questions about terraform-state-manager

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

FAQPage Schema
How do I import existing cloud resources into Terraform state without causing downtime?

To import existing cloud resources into Terraform state safely, you map unmanaged infrastructure to your configuration addresses and run planning checks before and after the operation to ensure alignment without downtime.

What is the best way to rename or move Terraform resources between modules without destroying them?

The best way to rename or move Terraform resources between modules is to use state move operations. This safely refactors resource addresses in your code while ensuring the actual cloud infrastructure remains untouched and avoids unnecessary recreation.

How do I remove a resource from Terraform state without destroying the actual infrastructure?

To remove a resource from Terraform state without destroying the actual infrastructure, you use the state remove operation. This detaches the resource from Terraform management, allowing you to delete it from your configuration while leaving the live cloud resource intact.

Can I migrate my Terraform backend storage from local to remote S3?

Yes, you can migrate your Terraform backend storage from local to remote S3. This process transitions your state file storage to a remote backend, requiring strict safety protocols like creating backups and verifying plans before and after the migration.

What safety protocols should I follow when managing Terraform state operations?

When managing Terraform state operations, you must follow safety protocols like creating state backups and running terraform plan before and after any import, move, remove, or backend migration actions to prevent unintended infrastructure destruction.