Repository navigation
Description
Why
CI's Terraform ceiling is 1.6.5 (.terraform.versions.json tested: ["1.5.5","1.6.5"], which every workflow matrix derives from). Terraform only emits functions / ephemeral_resource_schemas / write_only from 1.8/1.10/1.11 — so no CI job can ever fetch a schema containing the features #296 adds. The generation codepaths run in CI against empty inputs; the generated surfaces are covered only by fixture unit tests, the edge-provider compile slice (#311), and the external demo harness (sakul-learning/cdktn-provider-features-demo#5). That demo run caught three real bugs snapshot tests couldn't (nodenext import resolution, Node type-stripping rejecting a parameter property, variadic union binding) — proof the runtime slice has unique value.
Scope: one integration test × two pinned jobs
A single new integration test (test/typescript/provider-features/) running the standard harness (cdktn get → tsc → synth) against hashicorp-namespace providers only (random + time) — both small and mirrored on registry.opentofu.org. Assertions:
- generated provider class exposes the
functionsgetter; instance-method bindings compile and synthesizeprovider::<name>::<fn>(...)expressions; - nullable-parameter rendering: omitted optional and explicit
nullproduce the barenullkeyword in position (no JSundefineddropping / arg shifting); - ephemeral resource synthesizes to the top-level
ephemeralkey; targetVersionsfloors below the feature admit range fail synth with the family validation error.
Matrix: exactly two additive entries, landing together — Terraform current stable (1.15.x) and OpenTofu current stable (1.12.x) — pinned per-test, explicitly not by touching .terraform.versions.json (the existing 1.5.5/1.6.5 cross-product stays untouched).
Implementation notes
- Preferred mechanism: an opt-in per-test
pinVersionsfield intools/build-test-matrix.mjsso the thin job inherits existing integration plumbing (container, caching,ci/skip-integrationlabel). Integration test: ephemeral resources end-to-end, gated on Terraform >= 1.10 #312's TF>=1.10 ephemeral test should reuse the same mechanism. - First OpenTofu in this repo's CI: needs a setup step (opentofu/setup-opentofu or mise),
TERRAFORM_BINARY_NAMEpointing attofu, and awareness of the divergences already documented in commons (registry.opentofu.org/...cache/registry key shape; nodeprecation_messagein function schemas; provider-function language support 1.7 vs schema emission 1.8). - Do not use
cdktn-io/cfncompatin this test until it is published on the OpenTofu registry — it currently is not (provider registry registry.opentofu.org does not have a provider named registry.opentofu.org/cdktn-io/cfncompat, confirmed during feat: support newer provider plugin-protocol features via targetVersions (RFC-04) #296 validation).
Research task
- Get
cdktn-io/cfncompatlisted onregistry.opentofu.org(OpenTofu's registry is PR-driven via opentofu/registry — scope the submission requirements: GPG signing key, version manifest), so tofu-side coverage can later include a non-hashicorp, functions-heavy provider.
Relations
- Edge-provider schema: cross-language compile coverage for ephemeral resources, provider functions, write-only attributes #311 — compile slice (edge-provider schema; lands with feat: support newer provider plugin-protocol features via targetVersions (RFC-04) #296), disjoint failure class from this runtime slice.
- Integration test: ephemeral resources end-to-end, gated on Terraform >= 1.10 #312 — ephemeral end-to-end integration; unblocked by (and should reuse) the pin mechanism here.
- Bumping
.terraform.versions.jsontesteditself is a version-support-policy decision, deliberately out of scope here.
Activity
test(provider-generator): edge-provider compile coverage for function…
jsteinich commentedon Jul 19, 2026
I think this could be reasonable for short term, but I do think we are rapidly approach a point where we should change the default tested versions.
As much as I don't want to add testing overhead, I see having 3 tested versions as potentially ideal for the short - mid term:
In the long term we could probably drop the pre-fork version, but there is value in testing whatever our oldest officially supported version is.
feat: support newer provider plugin-protocol features via targetVersi…
feat: support newer provider plugin-protocol features via targetVersi…
chore: add OpenTofu and current Terraform to the jsii-terraform image (…
chore(gha): raise the Terraform test ceiling from 1.6.5 to 1.16.1
chore(gha): raise the Terraform test ceiling from 1.6.5 to 1.16.1
chore(gha): adopt the new jsii-terraform image and test Terraform 1.5…
feat(tests): add per-test runtime pinning to the integration matrix (#…
so0k commentedon Oct 12, 2026
fold #312 into this
test: cover the provider function targetVersions floor in provider-fe…