terraform-state

Manage Terraform state mappings between configuration blocks and real infrastructure resources.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/theslashdojo/dojo --skill terraform-state-theslashdojo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-state
Source: https://github.com/theslashdojo/dojo/tree/main/nodes/terraform/state
Command: npx skills add https://github.com/theslashdojo/dojo --skill terraform-state-theslashdojo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires terraform, and includes scripts (resource) components.

What problem does it solve?

Terraform state is the canonical record that maps your HCL configuration to real-world infrastructure, enabling safe planning and updates across teams. Terraform manages, tracks, and synchronizes resource attributes so that changes are predictable and auditable.

Core Features & Use Cases

  • List and view tracked resources with terraform state list and terraform state show.
  • Move resources between addresses or modules with terraform state mv to support refactoring.
  • Remove resources from state without impacting real infrastructure using terraform state rm.
  • Import existing resources into state with terraform import or declarative import blocks for batch workflows, enabling gradual adoption of IaC.
  • Pull and push state to remote backends for collaboration and disaster recovery, with locking and drift detection.

Quick Start

Initialize your Terraform project and begin state management by running terraform init, then run terraform state list to enumerate all tracked resources.

Frequently Asked Questions about terraform-state

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

FAQPage Schema
How do I move Terraform resources to a new module without recreating infrastructure?

Use Terraform state mv to move resources between addresses or modules during refactoring. This updates the state mapping while leaving real-world infrastructure completely untouched.

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

Import existing resources into Terraform state using terraform import or declarative import blocks. This enables gradual adoption of IaC by mapping real infrastructure to your HCL configuration.

How does Terraform state management work in team environments?

Terraform state management tracks resource attributes for predictable updates across teams. Remote backends provide collaboration, disaster recovery, and locking to ensure safe, multi-user workflows.

Can I remove a resource from Terraform state without deleting the actual infrastructure?

Yes, use terraform state rm to remove resources from state without impacting real infrastructure. This is useful for debugging state issues or decoupling resources from current configuration.

Do I need remote backends to coordinate Terraform state across multiple users?

Remote backends are required for safe, multi-user Terraform state coordination. They enable state pulling and pushing, locking to prevent concurrent writes, and drift detection for team workflows.

Why does my Terraform state mapping not match my current HCL configuration?

State mapping issues occur when configuration refactoring is not synchronized with Terraform state. Use state list to enumerate tracked resources and state show to inspect attribute mappings.