Home / Companies / HashiCorp / Blog / Post Details
Content Deep Dive

CDKTF 0.20 improves implementation of iterators and enables HCL output

Blog post from HashiCorp

Post Details
Company
Date Published
Author
Ansgar Mertens
Word Count
891
Language
English
Hacker News Points
-
Summary

CDK for Terraform 0.20 introduces improved iterators that enable developers to handle complex scenarios related to dynamic resource creation, supporting dynamic list iterations on the block and resource level. This new support allows developers to access resources created by iterators, chain iterators using `TerraformIterator.fromResources()` or `TerraformIterator.fromDataSources()`, and iterate over resource attributes containing values known only after apply. The update also introduces HCL output for CDKTF synth, enabling easier debugging and templating capabilities. Additionally, error messages are improved to provide more context and propose solutions, while Target CLI eases the burden of managing multiple clusters by using context profiles.