Skip to main content

Configuration File

tfts uses a configuration file named cdktf.json (or tfts.json) to manage project settings, providers, and modules.

Schema

The following fields are supported in the configuration file:

Example Configuration

cdktf.json

Environment Variables

You can override certain configuration settings using environment variables:
  • CDKTF_OUTDIR: Overrides the output directory setting.
  • CDKTF_CONTEXT_JSON: Provides context variables as a JSON string.

Advanced Examples

Using Context Variables

You can define context variables in your configuration file and access them in your code.
cdktf.json

Custom Output Directories

If you want to separate your generated bindings from your source code:
cdktf.json