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

Advanced AI Prompt for Designing Automated Terraform State Rollback Hooks

Customize the variables below to instantly engineer your prompt.

Required Variables

advanced-terraform-state-automated-rollback-logic.txt
Act as a Reliability Automation Engineer. Design a failsafe automated rollback mechanism intended to intercept catastrophic Terraform deployments. If a designated [FAILURE_CONDITION] (e.g., 5xx errors spike, health check fails) triggers the [ROLLBACK_TRIGGER] webhook during or immediately after a `terraform apply`, the pipeline must halt. Provide a robust shell script that utilizes the AWS CLI to interrogate the S3 backend versioning history, fetch the [PREVIOUS_STATE_ID] (the exact state JSON prior to the run), and executes a forced `terraform state push` to revert the remote state. Write a critical warning detailing why forcing a state rollback creates severe 'state drift' against the physical cloud resources, and outline the subsequent `terraform apply` required to physically destroy the newly deployed infrastructure.

Expected Visual Output

Expected visual output for Advanced AI Prompt for Designing Automated Terraform State Rollback Hooks

Example Text Output

"The AI would create a logic flow and a shell script for automated state version reversion"

More Cloud & DevOps Prompts

View all →

Frequently Asked Questions

What is the "Advanced AI Prompt for Designing Automated Terraform State Rollback Hooks" prompt used for?

The AI would create a logic flow and a shell script for automated state version reversion

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.