cdktf init fails with "Invalid values: Argument: template, Given: \"python3\""
Fixes the cdktf init template validation error when passing python3 instead of python. Covers the valid template choices and the correct init command. Use when cdktf init rejects the template argument. Not for provider or synth errors.
TL;DR
Use --template=python, not --template=python3. The valid choices are python and typescript (plus the other documented templates).
The error
Invalid values:
Argument: template, Given: "python3", Choices: "python", "typescript"Fix it
- Re-run init with the correct template name:
cdktf init --template=python --local. - Continue with
cdktf getto generate provider bindings.
Expected result: init scaffolds the Python project.
When to use this
cdktf initrejects your--templatevalue with "Invalid values"
When NOT to use this
- Init succeeds but later steps fail
Root cause
The CLI validates the template name against a fixed list; python3 is not in it even though the interpreter is Python 3. The template is named python regardless of interpreter version.
Edge cases
- Run
cdktf init --helpto see the full template list for your CLI version.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.