Upgrading to CDK for Terraform Version 0.7
Update your import statements for the AWS provider and learn to migrate your projects.
AWS Provider has namespaced resources
The AWS Provider has a size that makes it hard to navigate in editors, especially in languages that compile it to a single file like Python. We implemented namespaces that hold Resources and Data Sources the same category together, and the categories are available on the AWS Provider page. If you don't use the AWS provider no action is needed. If you do use the AWS provider, you need to adjust your import statements to match the namespaces.
Typescript
For Typescript you need to change the imports and reference the namespace
Alternatively you can deconstruct the namespace:
Python
For Python only the imports need to be changed:
C
For C# only the imports need to be changed:
Java
For Java only the imports need to be changed:
Go
For Go only the imports need to be changed:
Simplify Provider API Surface
When generating the provider bindings we previously translated any block to an array of a certain type, both in configuration and as properties on the resource / data source instances. For blocks that can only appear once at most this is making the API harder to use. From this version on these blocks are going to be just the type instead of an array of a certain type.
To migrate you need to update the cdktf
and cdktf-cli
version you are using to 0.7 and run cdktf get
in your project. The new bindings might use fewer arrays in the configuration than before, depending on the schema of the providers you use. The typesystem and cdktf synth
will guide your migration.
The benefit of this change is that object properties can be accessed directly, e.g.