Expected Behavior
TerraformOutput accepts a typed precondition (TerraformOutputConfig.precondition), so it should synthesize an output precondition block (JSON and HCL).
Actual Behavior
The property is stored and then silently dropped — no precondition in the synthesized output, no warning.
packages/cdktn/src/terraform-output.ts declares it (:26), keeps it (:35, :45), but neither synthesizeAttributes() (:99-106) nor synthesizeHclAttributes() (:108-137) emits it, and nothing else reads .precondition.
Steps to Reproduce
const env = new TerraformVariable(stack, "env", { type: "string" });
new TerraformOutput(stack, "out", {
value: env.stringValue,
precondition: { condition: Op.neq(env.stringValue, ""), errorMessage: "env must not be empty." },
});
// Testing.synth(stack) -> "out": { "value": "${var.env}" } (no precondition; same with synthHcl)
Workaround
output.addOverride("precondition", [{ condition: "${...}", error_message: "..." }])
Anything Else?
Expected Behavior
TerraformOutputaccepts a typedprecondition(TerraformOutputConfig.precondition), so it should synthesize an outputpreconditionblock (JSON and HCL).Actual Behavior
The property is stored and then silently dropped — no precondition in the synthesized output, no warning.
packages/cdktn/src/terraform-output.tsdeclares it (:26), keeps it (:35,:45), but neithersynthesizeAttributes()(:99-106) norsynthesizeHclAttributes()(:108-137) emits it, and nothing else reads.precondition.Steps to Reproduce
Workaround
output.addOverride("precondition", [{ condition: "${...}", error_message: "..." }])Anything Else?
lifecycle.precondition/postconditionas an attribute list). The HCL path here should render repeated blocks, not an attribute list.terraform testRFC (cdktn-planning RFC 09):expect_failures = [output.<name>]is the way to test an output precondition, which is meaningless while the precondition is dropped. Prerequisite for that RFC.