New to Kestra?
Use blueprints to kickstart your first workflows.
Clone Rego policies from Git, run opa test, pause for human approval, then upload the module to your OPA server. Orchestrate OPA policy promotion with Kestra.
Give every Open Policy Agent (OPA) change a safe, auditable path to production. This blueprint orchestrates the full OPA policy lifecycle: it pulls Rego policies from a Git repository, runs the opa test suite, holds promotion for an explicit human approval, and only then uploads the reviewed module to a running OPA server. Untested or unapproved Rego never reaches the enforcement point, which closes the gap between a policy commit and the authorization decisions it controls for Kubernetes admission, API authorization, and other guardrails.
clone_policies (io.kestra.plugin.git.Clone) clones the repo at policy_repo and policy_branch into a policies directory.test_policies (io.kestra.plugin.scripts.shell.Commands) runs opa test policies/ -v inside the openpolicyagent/opa:latest-debug container via the Docker task runner.notify_approval (io.kestra.plugin.googleworkspace.chat.GoogleChatIncomingWebhook) posts a Google Chat message telling the team that a tested policy is waiting.approve_promotion (io.kestra.plugin.core.flow.Pause) blocks for up to approval_timeout (default PT2H) until a human resumes the execution.upload_policy (io.kestra.plugin.ee.opa.policy.Upload) reads the policy_file and creates or replaces the module identified by policy_id on the OPA server.OPA itself has no built-in pipeline to test, review, and deploy Rego from a repository. Kestra fills that gap with event triggers, automatic retries, full execution lineage, and a Pause task for human-in-the-loop approval, all declared in plain YAML. You get one auditable workflow from commit to enforcement instead of scattered scripts.
opa test can run.OPA_URL: base URL of the OPA server (for example, https://opa.example.com).OPA_TOKEN: bearer token for the OPA server, if authentication is enabled.GOOGLE_CHAT_WEBHOOK_URL: Google Chat incoming webhook URL for the approval notification.OPA_URL, OPA_TOKEN, and GOOGLE_CHAT_WEBHOOK_URL to your Kestra namespace secrets.policy_repo, policy_branch, policy_id, and policy_file for your Rego project.opa test pass, then resume the Pause to upload the module.Schedule trigger with a Git push webhook to promote on merge.opa eval step against sample input before the approval pause.policy_file values to promote several modules at once.