7.8 C
New York
Friday, November 25, 2022

CDK for Terraform Improves Performance by Adding Namespaces – InfoQ.com

Live Webinar and Q&A: Success in the Cloud: How to Avoid Kubernetes Deployment Pitfalls (Live Webinar November 15, 2022) Save Your Seat
Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Liz Rice considers several facets where eBPF can help, from dynamic vulnerability patching through super-fast load balancing to multi-cluster networking.
Wes Reisz speaks with long-time open-source contributor and startup founder Matt Butcher who is the CEO of Fermyon Technologies and is at the forefront of the Web Assembly (Wasm) work being done in the cloud. The two discuss Butcher’s belief we’re at the start of a 3rd wave of cloud computing, the state of the Wasm ecosystem, and what Fermyon’s doing in the space.
In this article, author discusses data pipeline and workflow scheduler Apache DolphinScheduler and how ML tasks are performed by Apache DolphinScheduler using Jupyter and MLflow components.
The panelists discuss how to lead organizational change to improve velocity and quality.
Dynamic security testing tools don’t require advanced cybersecurity knowledge to operate. Integrating DAST into your CI/CD pipeline should be done in stages by focusing on the riskiest areas first.
Make the right decisions by uncovering how senior software developers at early adopter companies are adopting emerging trends. Register Now.
Adopt the right emerging trends to solve your complex engineering challenges. Register Now.
Your monthly guide to all the topics, technologies and techniques that every professional needs to know about. Subscribe for free.
InfoQ Homepage News CDK for Terraform Improves Performance by Adding Namespaces
Oct 23, 2022 2 min read
Matt Campbell
HashiCorp released version 0.13 of the CDK for Terraform (CDKTF) with significant improvements to performance. The release introduces a major restructuring of the language by introducing namespaces. The namespace improvement dramatically enhances the performance of synthesizing infrastructure. This release builds upon the 0.12 release which saw CDKTF move into general availability.
The CDK allows for writing Terraform configurations in a number of programming languages including C#, Python, TypeScript, Go, and Java. It includes support for all existing Terraform providers and modules. The CDKTF application code synthesizes into JSON output that can be deployed with Terraform directly.
Version 0.13 introduces the concept of namespaces into each class in the generated provider bindings. These namespaces are automatically derived from the Terraform resource or data source it originates from. Previously each provider's exports were a flat list of components. This resulted in large packages that the various language compilers struggled with processing. Users of CDKTF indicated that synthesizing could be very slow and, for Python users, could cause the IDE to crash.
The namespaces change produces a number of small packages, which is faster for the compilers to process. This has led to some significant improvements in processing time according to Nara Kasbergen Kwon, Engineering Manager at Hashicorp. Kwon shares that recent benchmarking tests show:
The introduction of namespaces is a breaking change, however, the 0.13 release is backward compatible with provider bindings generated by version 0.12. This allows for the mixing of namespaced and non-namespaced providers as needed. Note that providers generated by version 0.13 will be namespaced. This backward compatibility will be removed in version 0.14 and only namespaced providers will be supported.
The AWS provider was previously namespaced but in a way that was distinct from the new namespacing method. As such, how it is imported has changed to align with the new namespacing model. Previously the AWS provider could be imported in Go as follows:
With the new namespacing model, it will now need to be imported as follows:
According to Kwon, the upcoming 0.14 release is scheduled for a mid-November 2022 release. Kwon shares that the release "will focus primarily on quality-of-life improvements that make it easier to use pre-built providers." The team found that pre-built providers supply a better developer experience than locally generating them using cdktf get.
More information about the contents of the release can be found in the blog post and upgrade guide. Hashicorp hosts community office hours and has a discussion forum for questions. The CDK for Terraform Learn Guide is recommended for users new to the CDK.

Becoming an editor for InfoQ was one of the best decisions of my career. It has challenged me and helped me grow in so many ways. We’d love to have more people join our team.

Code, deploy, and scale Java your way.
Microsoft Azure supports your workload with abundant choices, whether you're working on a Java app, app server, or framework. Learn more.
A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

We protect your privacy.
You need to Register an InfoQ account or or login to post comments. But there’s so much more behind being registered.
Get the most out of the InfoQ experience.
Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

We protect your privacy.
Real-world technical talks. No product pitches.
Practical ideas to inspire you and your team.
QCon San Francisco – Oct 24-28, In-person.

QCon San Francisco brings together the world’s most innovative senior software engineers across multiple domains to share their real-world implementation of emerging trends and practices.
Uncover emerging software trends and practices to solve your complex engineering challenges, without the product pitches.Save your spot now
InfoQ.com and all content copyright © 2006-2022 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we’ve ever worked with.
Privacy Notice, Terms And Conditions, Cookie Policy


Related Articles


Please enter your comment!
Please enter your name here

Latest Articles