Expose plan-phase diagnostics to policy.
Preferred shape: input.terraform.diagnostics[] in the plan policy input, each entry carrying severity, summary, detail, address (when resource-scoped), and source range (filename + line). That shape is the most useful because a plan policy could then act on warnings and set run flags — which notification policies already read via input.run_updated.run.flags.
Workable alternative: write them into the workspace before after_plan hooks run, e.g. spacelift.diagnostics.json beside spacelift.plan. Either one solves it; we don't need both.
This is data OpenTofu/Terraform already emit — "plan -json" produces exactly these fields as {"@level":"warn","diagnostic":{...}}. Nothing new needs computing, it just isn't captured anywhere reachable.
Please authenticate to join the conversation.
⬆️ Gathering votes
💡 Feature Requests
Policies
About 15 hours ago
Get notified by email when there are changes.
⬆️ Gathering votes
💡 Feature Requests
Policies
About 15 hours ago
Get notified by email when there are changes.