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
{{ message }}
Repository navigation
Enable Terraform function version validation by default (drop the validateTerraformFunctionVersions gate) in 0.24 #352
#296 gates ValidateFunctionVersionSupport behind the pre-existing validateTerraformFunctionVersions context flag, while the new ValidateProviderFunctionTargetSupport and write-only target validation are always on (no feature flag).
Since the upcoming release is a 0.23 -> 0.24 bump (pre-v1 "breaking change" release), a follow-up PR should enable function version validation by default and drop the gate, so the Fn.* baseline validation and the provider-feature validations behave consistently.
PR #362 implements this, together with #342 (same flag, same work).
Correction: the key name in this issue's title doesn't exist
This issue refers to validateTerraformFunctionVersions, but that string appears nowhere in the tree — repo-wide search, node_modules excluded, zero hits. The real context key is validateFunctionVersions, declared in packages/cdktn/src/features.ts and read in packages/cdktn/src/terraform-stack.ts.
Flagging it rather than silently fixing it, because the wrong name is the kind of thing that propagates into changelogs and migration notes — and a migration note telling users to remove a key they never set would be worse than no note. #342 quotes the real code, so that issue was used as the source of truth for the implementation.
Worth renaming this issue's title if you want the history to read cleanly.
What landed
The flag is deleted outright, not kept as an accepted-but-ignored no-op, following the repo's existing precedent 3c323e76d. Deletion already gives the backwards-compatible behaviour: cdktf.json's context is an untyped passthrough map with no unknown-key validation, so a stale "validateFunctionVersions": "true" simply becomes inert rather than erroring.
ValidateFunctionVersionSupport is now registered on every TerraformStack unconditionally, alongside ValidateProviderPresence and ValidateProviderFunctionTargetSupport.
Behaviour change to be aware of: setting the key to a falsy value no longer opts out. Projects using one of the 7 version-constrained functions (base64gunzip, cidrcontains, convert, ephemeralasnull, issensitive, templatestring, urldecode) outside their declared targetVersions will now fail synth — raise targetVersions in cdktf.json, or pass skipValidation: true to the App.
I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Activity
so0k commentedon Jul 30, 2026
PR #362 implements this, together with #342 (same flag, same work).
Correction: the key name in this issue's title doesn't exist
This issue refers to
validateTerraformFunctionVersions, but that string appears nowhere in the tree — repo-wide search,node_modulesexcluded, zero hits. The real context key isvalidateFunctionVersions, declared inpackages/cdktn/src/features.tsand read inpackages/cdktn/src/terraform-stack.ts.Flagging it rather than silently fixing it, because the wrong name is the kind of thing that propagates into changelogs and migration notes — and a migration note telling users to remove a key they never set would be worse than no note. #342 quotes the real code, so that issue was used as the source of truth for the implementation.
Worth renaming this issue's title if you want the history to read cleanly.
What landed
The flag is deleted outright, not kept as an accepted-but-ignored no-op, following the repo's existing precedent
3c323e76d. Deletion already gives the backwards-compatible behaviour:cdktf.json'scontextis an untyped passthrough map with no unknown-key validation, so a stale"validateFunctionVersions": "true"simply becomes inert rather than erroring.ValidateFunctionVersionSupportis now registered on everyTerraformStackunconditionally, alongsideValidateProviderPresenceandValidateProviderFunctionTargetSupport.Behaviour change to be aware of: setting the key to a falsy value no longer opts out. Projects using one of the 7 version-constrained functions (
base64gunzip,cidrcontains,convert,ephemeralasnull,issensitive,templatestring,urldecode) outside their declaredtargetVersionswill now fail synth — raisetargetVersionsincdktf.json, or passskipValidation: trueto theApp.Full details and verification in #362.
feat(lib)!: validate Terraform function versions by default (open-con…
feat(lib)!: validate Terraform function versions by default (open-con…
github-actions commentedon Aug 30, 2026
I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.