Upgrading to CDK for Terraform Version 0.13
0.13 includes performance improvements to generated providers. Instead of exporting a flat list of exports including all supported resources and data sources, we now export each construct and it's associated structures in their own namespace. Due to this, the way you import constructs from your CDKTF application will change. For more information regarding this release, and some of the reasonings behind the changes, please check out the version 0.13 release post.
CDKTF get and compatibility with non-namespaced providers
CDKTF 0.13 is backwards compatible and supports 0.12 generated (and pre-built) non-namespaced providers without any modifications. However, it will only generate namespaced providers. This means that if you were to generate a new provider using version 0.13, it will be namespaced. In order to migrate gradually, you may want to check in the generated provider bindings from version 0.12 to your codebase until you're ready to migrate them. The next major versions of our pre-built providers after the release of version 0.13 will also become namespaced. Same rules apply there: as long as you don't upgrade your pre-built providers beyond their current major version, no changes will be required on your part.
New way to import constructs
Below is a comparison of pre 0.13 imports vs namespaced based imports introduced in version 0.13, per supported language:
Typescript
Before version 0.13:
Version 0.13:
Go
Note: For Go projects, another important thing to note is that we've also moved our pre-built providers to the
cdktf
Github Organization. You can find more about that change here.
Before version 0.13:
Version 0.13:
Python
Before version 0.13:
Version 0.13:
Java
Before version 0.13:
Version 0.13:
C#
Before version 0.13:
Version 0.13:
New way to import constructs for the AWS provider
If you've used our AWS provider, you might have noticed that it's already namespaced. However, before version 0.13, the AWS provider was a special case that we were namespacing by hand. With the release of version 0.13, we're no longer going to be doing that.
Typescript
Before version 0.13:
Version 0.13:
Go
Before version 0.13:
Version 0.13:
Python
Before version 0.13:
Version 0.13:
Java
Before version 0.13:
Version 0.13:
C#
Before version 0.13:
Version 0.13: