New to Kestra?
Use blueprints to kickstart your first workflows.
Gate every commit with terragrunt hclfmt and hclvalidate in Kestra. A webhook-triggered flow posts a pass or fail verdict to Discord.
Broken or unformatted HCL should never reach a plan, let alone an apply. Terragrunt ships two purpose-built checks for this: hclfmt --check fails when any .hcl file deviates from canonical formatting, and hclvalidate fails when the configuration contains invalid constructs. This blueprint wires both into a webhook-triggered Kestra flow that CI, a Git provider, or a curl call can invoke, and posts exactly one verdict message to Discord whether the gate passes or fails.
The demo ships a small, correctly formatted repository inline through inputFiles, so the first execution demonstrates the passing path with no setup beyond two secrets.
ci_webhook trigger (io.kestra.plugin.core.trigger.Webhook) starts the flow on demand, secured by a webhook key from a secret, so a pipeline step or a push webhook can invoke the gate.hcl_checks (io.kestra.plugin.terragrunt.cli.TerragruntCLI) materializes the repo and runs terragrunt hclfmt --check --working-dir live, then terragrunt hclvalidate --working-dir live. Each command's result is captured into a flag with || fmt_ok=0 style guards instead of failing the task, so both checks always run and the verdict is always produced.{{ outputs.hcl_checks.vars.fmt_ok }} and {{ outputs.hcl_checks.vars.val_ok }}.verdict (io.kestra.plugin.core.flow.If) posts a Discord pass message when both flags are 1, and a fail message naming which check broke otherwise.errors block posts a separate crash alert, distinguishing "the code failed the gate" from "the gate itself did not run".Running these checks in scattered CI scripts means every repository re-implements the same steps, and the results vanish with the CI run. In Kestra, the gate is one flow with a stable webhook URL, every invocation is an execution with logs and structured outputs, and the same flow can grow richer steps, a plan on success, a ticket on repeated failures, without touching any repository's pipeline definition.
DISCORD_WEBHOOK_URL: Discord incoming webhook URL.WEBHOOK_KEY: key that authorizes calls to the webhook trigger.DISCORD_WEBHOOK_URL and WEBHOOK_KEY secrets to your Kestra namespace.inputFiles with namespaceFiles or a io.kestra.plugin.git.Clone task that checks out the commit referenced in the webhook body.terragrunt run-all validate as a third, deeper check once the fast gates pass.