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

Advanced Terraform CI/CD Enforcement with Open Policy Agent

Customize the variables below to instantly engineer your prompt.

Required Variables

terraform-cicd-opa-enforcement.txt
Act as a DevSecOps Lead and Governance Expert. Architect an impenetrable, policy-as-code security gate utilizing Open Policy Agent (OPA) and Rego directly injected into a Terraform CI/CD deployment pipeline for [CLOUD_PROVIDER]. Your mandate is to write the exact, mathematically complex Rego policies required to aggressively parse the raw `terraform plan -out=tfplan.json` output before any infrastructure is mutated. The policy must strictly enforce the [COMPLIANCE_FRAMEWORK] (e.g., SOC2, PCI-DSS) by guaranteeing all S3 buckets/storage accounts are fully encrypted with customer-managed KMS keys and blocking public ACLs. Furthermore, write a devastatingly strict deny-list rule that instantly fails the pipeline with an `exit 1` code if a developer attempts to provision any of the [FORBIDDEN_RESOURCES] (e.g., `aws_iam_user` or unencrypted RDS instances). Output the precise GitHub Actions YAML required to download OPA, evaluate the plan, and post the compliance failure report as a sticky comment on the Pull Request.

Example Text Output

"A bulletproof DevSecOps pipeline featuring strict Rego policies that physically prevent human engineers from deploying insecure or expensive cloud infrastructure, halting breaches before they occur."

More Cloud & DevOps Prompts

View all →

Frequently Asked Questions

What is the "Advanced Terraform CI/CD Enforcement with Open Policy Agent" prompt used for?

A bulletproof DevSecOps pipeline featuring strict Rego policies that physically prevent human engineers from deploying insecure or expensive cloud infrastructure, halting breaches before they occur.

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.