TNS
VOXPOP
What news from AWS re:Invent last week will have the most impact on you?
Amazon Q, an AI chatbot for explaining how AWS works.
0%
Super-fast S3 Express storage.
0%
New Graviton 4 processor instances.
0%
Emily Freeman leaving AWS.
0%
I don't use AWS, so none of this will affect me.
0%
DevOps / Infrastructure as Code / Software Testing

HashiCorp Hears Users, Rolls out New Testing/QA Tools for Terraform

HashiCorp introduces the Terraform Test Framework and other new additions to the Terraform platform.
Oct 12th, 2023 8:12am by
Featued image for: HashiCorp Hears Users, Rolls out New Testing/QA Tools for Terraform
Featured image via Unsplash.

SAN FRANCISCO – HashiCorp, one of the world’s leading purveyors of infrastructure-as-a-service software, manages the Terraform open source project. It knows how important the testing, standardization and QA portions of the process are so all those complicated connections work as they should. Thus, these items comprise headline news of this year’s HashiConf 2023 conference here.

The 11-year-old San Francisco-based company on Oct. 11 previewed several key new additions to the Terraform platform and Terraform Cloud, products and services that continue to gain market share on an annual basis — thanks largely to the company’s free community edition and open source roots. Some are ready for use this week, others are in various stages of development. They are:

  • Terraform Test Framework (GA now) helps produce higher-quality modules. Automates unit and integration testing of Terraform code; provides an integrated workflow to publish modules to the private registry. Key announcements include AI-generated tests for HashiCorp Terraform Cloud, the debut of HCP Vault Radar, HCP Vault Secrets, HCP Consul Central, and HCP Waypoint templates. For Terraform Cloud, large language models (LLMs) generate tests for a module on behalf of the user, allowing module authors to start writing tests faster than previously.
  • Terraform stacks (private preview only at the conference): Major enhancement to the Terraform execution engine that enables complex deployments across multiple environments across modular infrastructure components.
  • Terraform enhanced editor validation (GA now): Automatically validates Terraform code, including copying/pasting from AI tooling or using IDE-integrated tools, such as GitHub Copilot or Amazon CodeWhisperer.
  • Test-integrated module publishing (beta) streamlines the testing and publishing process.
  • Generated module tests (beta) help module authors get started fast.
  • Terraform Cloud ephemeral workspaces (GA now): Helps manage the cleanup of unused resources accumulated over time to optimize cloud costs. Also available in Terraform Enterprise.

For those new to this IT sector, Terraform is a popular open source tool that enables users to define, provision, and manage infrastructure as code. Terraform can be used to provision and manage a wide range of infrastructure resources, including servers, storage, networking, and applications. Terraform providers are plugins that allow Terraform to interact with various cloud providers, APIs, services and other systems that Terraform doesn’t natively support out of the box.

Ultimately, the main message at HashiConf is all about provisioning data resources effectively, cost-efficiently and in a set-it-once automated fashion.

“This Terraform Test Framework is brand new and pretty interesting,” Chris Van Wesep, HashiCorp Sr. Director of Product Marketing, told The New Stack. “Workspaces are the area of work most teams operate in with Terraform. So many customers were saying: ‘I know I’m wasting money in the clouds. I don’t know exactly where, but I know.’ Part of that is from resources that have been provisioned but forgotten. A lot of them are dead, such as dev-test environments that get set up, the owner moves on, and afterward, nobody knows what’s running on this thing that’s out there consuming resources.”

Terraform Test Framework can now identify these leakages, notify the workspace owner, and then pull back the resources as the process is shut down — all in automated processes. This new tool is open to general availability at this week’s event, Van Wesep said.

The Test Framework, introduced in Terraform 1.6, gives developers tools to perform unit and integration testing of Terraform code. Module authors generally adopt the test framework quickly because it is written in HCL (HashiCorp language) and uses a structure similar to Terraform configurations.

Terraform Tests Enable High-Quality, Reliable Code Modules

Modules are the most utilized way Terraform users standardize their infrastructure provisioning, so it is crucial to have high-quality, reliable ones, Van Wesep said.

“One of the nice things about Terraform is the ability to write code once and then have multiple teams use it as needed,” Van Wesep said. “And the way that most large organizations really amplify that is through the concept of modules. So they’ll say, ‘This little chunk of activity is a very repeatable process, so we’ll create a module for it that we’ll publish to our registry.’ Then any team that needs to execute it can just go and call the module and it’ll pull into their code set and execute. If you go to the Terraform registry, you’ll see public modules that have already been created, where people said, ‘Well, this is a generally useful thing to be able to do. So let me just write the code for it, share it with people and let them use it.'”

A bug in a module’s code can cause outages, compliance breaches, or open security holes — and not just once, but every time it’s reused. And if a bug is democratized throughout an ecosystem, woe is the dev team. Without a testing framework, this quality-control process can be slow and laborious. Sometimes testing is skipped altogether, which is not something IT managers want to find out.

The Terraform development community has built several popular testing tools, but they often use full programming languages such as Ruby or Go. For a while, HashiCorp wanted to bring native testing to Terraform using HashiCorp Configuration Language (HCL), removing the need for context switching or additional learning.

In the recent 2023 State of IaC Report, it was found that 90% of cloud users are using Infrastructure as Code (IaC). However, due to the preponderance of open source tools available, it’s difficult to pin down where HashiCorp pays in the open market. According to Synergy Research Group, the global IaaS market was worth $132 billion in 2022. AWS is the leading IaaS provider with a market share of 33%, followed by Microsoft Azure with 21% and Google Cloud Platform with 10%. HashiCorp’s market share in the IaaS market is difficult to estimate, but it is smaller than the top 3 at this point.

Other popular IaC tools include Ansible, Chef and Puppet. HashiCorp does not own a proven percentage of the IaaS market, but its tools are used by many organizations to manage their IaaS deployments.

Group Created with Sketch.
TNS owner Insight Partners is an investor in: Enable, The New Stack.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.