Blenra LogoBlenra
Optimized for: Gemini / ChatGPT / Claude
#Terraform

Advanced AI Prompt for Terraform State Refactoring and Resource Moving

Customize the variables below to instantly engineer your prompt.

Required Variables

advanced-terraform-state-mv-refactoring.txt
Act as an Expert Terraform Consultant. Generate a highly calculated migration plan to safely refactor monolithic infrastructure code into a strict modular architecture. Output a precise series of `terraform state mv` commands required to surgically migrate resources from the legacy [OLD_MODULE_PATH] namespace into the newly defined [NEW_MODULE_PATH] without triggering any destructive resource recreation. Targeting the remote state located at [STATE_FILE_URI], write an idempotent bash script that automates this `mv` process for highly critical, stateful resources (like VPCs, RDS instances, or KMS keys). Dictate a mandatory pre-flight validation step using `terraform plan` to mathematically guarantee zero pending adds/destroys are queued after the state manipulation.

Example Text Output

"The AI would generate a step-by-step migration guide and a shell script containing 'terraform state mv' commands mapped to the specific module paths provided."

More Cloud & DevOps Prompts

View all →

Frequently Asked Questions

What is the "Advanced AI Prompt for Terraform State Refactoring and Resource Moving" prompt used for?

The AI would generate a step-by-step migration guide and a shell script containing 'terraform state mv' commands mapped to the specific module paths provided.

Which AI tools work with this prompt?

This prompt is optimized for Gemini / ChatGPT / Claude, but works great with ChatGPT, Claude, Gemini, and other large language models. Simply copy it and paste it into your preferred AI tool.

How do I customize this prompt?

Use the variable fields above to fill in your specific details. The prompt will auto-update as you type, ready to copy instantly.

Is this prompt free?

Yes! All prompts on Blenra are free to copy and use immediately. No account required.