Blenra LogoBlenra
Optimized for: Gemini / ChatGPT / Claude
#CI/CD

Advanced AI Prompt for Terraform IaC Validation and Apply

Customize the variables below to instantly engineer your prompt.

Required Variables

terraform-iac-validation-apply.txt
Act as a Lead Infrastructure Automation Engineer. Develop a GitOps-driven GitHub Actions workflow for managing Infrastructure as Code via Terraform version [TF_VERSION]. The workflow must: 1) On Pull Request: Execute `terraform init`, `terraform fmt -check`, `terraform validate`, and a speculative `terraform plan` within [TF_WORKING_DIR]. 2) Utilize a GitHub Action (e.g., `tfsec` or `checkov`) to perform a static security analysis on the HCL files. 3) Intercept the output of the `plan` and inject it as a highly readable comment directly on the Pull Request for peer review. 4) On push to the `main` branch: Execute `terraform apply -auto-approve` to provision the infrastructure, strictly utilizing a remote state locking mechanism defined in [BACKEND_CONFIG].

Example Text Output

"A GitOps-style YAML that integrates Terraform CLI with PR commenting and security linting for infrastructure changes."

More Cloud & DevOps Prompts

View all →

Frequently Asked Questions

What is the "Advanced AI Prompt for Terraform IaC Validation and Apply" prompt used for?

A GitOps-style YAML that integrates Terraform CLI with PR commenting and security linting for infrastructure changes.

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.