Cloud Development Kit for Terraform 0.10 (CDKTF) enables multi-stack deployments and improves the CLI experience.
We are excited to announce the release of Cloud Development Kit for Terraform (CDKTF) 0.10. With CDK for Terraform, you can write Terraform configurations in your choice of C#, Python, TypeScript, or Java (with experimental support for Go), and still benefit from the full ecosystem of Terraform providers and modules.
Key improvements in CDK for Terraform 0.10 include:
destroycommands, improving the debugging and reviewing process.
CDKTF applications can contain multiple stacks that each represent a collection of infrastructure components, allowing you to separate state management for multiple environments. For example, you may want a separate configuration for development, testing, and production environments.
The 0.9 release enabled cross-stack references, with a dependency tree created in the
cdktf.out/manifest.json file to make it clear which stacks depend on resources defined in other stacks. With CDKTF 0.10, we implemented a new CLI workflow to support automated multi-stack deployment, which relies on those dependency trees to ensure that the stacks in your application are deployed in the correct order.
You can now start a process from the CLI to deploy all stacks in your application in the correct order, with either an auto-approve option or a manual approval process that allows you to review the
diff for each stack before continuing to the next.
The watch command has also been updated to support multi-stack workflows and you can now make it explicit which files you want to watch.
0.10 improves the CLI output for
destroy commands to provide a complete view of how resources will be impacted by a configuration change. We now ensure that the full Terraform output is streamed to the CLI, making sure that no valuable information is swallowed or lost. The logs are now formatted to show an attribute level diff, ensuring you understand the impact of your changes. In addition to making sure the full stream of logs is presented, we also implemented several improvements to fix scrollback issues and ensure that the logs are readable on smaller screen sizes.
CDKTF generates the required code bindings for the providers and modules that you define in cdktf.json. This allows you to define resources for that provider in your application. Previously, CDKTF had a limited way of working with lists that were returned in the generated code bindings for providers. To improve the ease of working with lists in your chosen programming language, we made a change to the type of list attributes. This improvement to the generated provider code bindings now allows referencing lists of computed attributes as a whole list, instead of just individual items of that list.
Note: This change will require changes to existing application code when upgrading to 0.10. Please see the 0.10 Upgrade Guide for more information.
The CDK for Terraform CHANGELOG contains a comprehensive list of additional enhancements and bug fixes. Please note that CDKTF 0.10 contains breaking changes that may require code updates. Please see the CHANGELOG and 0.10 Upgrade Guide for details.
Whether you’re experimenting or actively using CDK for Terraform, we’d love to hear from you. Please file any bugs you encounter, let us know about your feature requests, and share other questions, thoughts, and experiences in the CDK for Terraform discussion forum.
The HashiCorp Terraform AWS provider has surpassed one billion downloads — here’s how we got there, and what to look for next.
Run tasks can now be accessed from the HashiCorp Terraform Registry, helping developers discover run tasks they can integrate with their existing Terraform workflow.
Cloud Development Kit for Terraform (CDKTF) 0.14 makes it easier to add and upgrade Terraform providers.