You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up from #296 (tracked in the PR body as "hcl2cdk conversion of ephemeral {} blocks — tracked, not built").
Why
#296 generates TerraformEphemeralResource bindings and synthesizes top-level ephemeral {} blocks, but the convert direction is missing: cdktn convert silently drops ephemeral blocks from input HCL. packages/@cdktn/hcl2cdk/src/schema.ts defines the accepted input via a non-passthrough zod object; unknown top-level keys (including ephemeral) are stripped before conversion logic runs, with no warning.
What
cdktn convert should turn ephemeral "random_password" "pw" { ... } into new EphemeralRandomPassword(...) referencing the generated bindings, exactly parallel to resource/data-source conversion.
How (implementation notes)
schema.ts: add ephemeral top-level key (same shape as resource).
References: ephemeral.<type>.<name>.<attr> expressions must resolve to the construct's attribute accessors.
Consider emitting a conversion warning for any other silently-dropped top-level key while in there (moved/check/removed share the same silent-strip behavior).
Follow-up from #296 (tracked in the PR body as "hcl2cdk conversion of ephemeral {} blocks — tracked, not built").
Why
#296 generates
TerraformEphemeralResourcebindings and synthesizes top-levelephemeral {}blocks, but the convert direction is missing:cdktn convertsilently dropsephemeralblocks from input HCL.packages/@cdktn/hcl2cdk/src/schema.tsdefines the accepted input via a non-passthrough zod object; unknown top-level keys (includingephemeral) are stripped before conversion logic runs, with no warning.What
cdktn convertshould turnephemeral "random_password" "pw" { ... }intonew EphemeralRandomPassword(...)referencing the generated bindings, exactly parallel to resource/data-source conversion.How (implementation notes)
schema.ts: addephemeraltop-level key (same shape asresource).ephemeral_type prefix used by the generator (class namesEphemeral<PascalType>, namespace foldersephemeral-<kebab-type>/) — the prefix conventions were fixed in feat: support newer provider plugin-protocol features via targetVersions (RFC-04) #296's provider-generator commit.ephemeral.<type>.<name>.<attr>expressions must resolve to the construct's attribute accessors.moved/check/removedshare the same silent-strip behavior).