Skip to main content

Terraform adds native monorepo support, Stack component configurations, and more

HCP Terraform and Terraform Enterprise continue to enhance scale and control, helping platform teams standardize best practices while accelerating secure infrastructure delivery.

In the past few months, the HashiCorp Terraform engineering team continuously improved on our features to help platform teams scale infrastructure operations efficiently and securely by standardizing workflows, improving discoverability, and removing operational friction. The latest HCP Terraform and Terraform Enterprise improvements include:

  • Stack component configurations in the private registry (GA)
  • Terraform migrate tool for workspaces to Stacks migration (Beta)
  • Flexible module publishing (GA)
  • Self-host HCP Terraform agents for module testing (GA)
  • Terraform search and import (GA)

»Stack component configurations in the private registry

We announced the general availability of Terraform Stacks back at HashiConf in September to help users simplify infrastructure provisioning and management at scale.

Feature gap: To realize the feature’s full potential, users need a centralized way to share and consume reusable, versioned Stack component configurations. Without a related artifact in your private registry, your users are on their own for defining the components piece of their stacks — and they may struggle to define their Stack components within your organization’s best practices.

What’s new: To address this, we are excited to introduce Stack component configurations, which make standardized, complex infrastructure patterns discoverable in your private registry. Much like private modules define your organization’s best practices for your Terraform workspace configurations, component configurations achieve this for your Terraform Stacks. And the outputs of one component in a Stack component configuration can be the inputs of another component, which means platform teams can tie modules together in a reusable configuration.

Benefits: This new registry artifact improves developer velocity while reducing risks caused by human errors. Application engineers also don’t have to figure out how to piece together the right module resources in a Stack. Like Terraform modules, Stack component configurations can be built ahead of time, approved, and reused infinitely.

Visit the HashiCorp Developer site to learn how to define and configure components in a Stack, and how to write and publish Stack configurations to the private registry.

»Flexible module publishing

Feature gap: Many organizations use monorepos — a single repository for all their code — to manage multiple modules efficiently. However, this common practice didn’t align with the structure of the HCP Terraform and Terraform Enterprise private registry, which historically only supported one module per repository and forced rigid naming conventions of the module repositories. This meant platform teams were forced to support single-repo module management or build and maintain complex, API-driven publishing workflows.

What’s new: We're excited to introduce flexible module publishing for both HCP Terraform and Terraform Enterprise to solve this challenge. This feature provides native monorepo support by allowing you to specify both the VCS repository and the specific module directory path within a module during the publishing process. Crucially, you can also customize the module's name and target provider, breaking free from the old, restrictive naming format. This gives platform teams the flexibility and control they need to structure their code exactly how they want.

Benefits: The primary benefit is simple: you can now leverage all the advantages of the private registry (centralization, versioning, and standardization) without any refactoring cost. Platform teams can instantly publish modules from existing monorepos just like they would if they were sharing a module at /modules/vpc-networking within a large platform-shared repo. This not only saves significant time but also accelerates the availability of approved, internal modules for all your development teams, making your platform engineering efforts less expensive.

To learn more about how to publish a module to Terraform’s private registry, check out the documentation.

»Self-host HCP Terraform agents for module testing

Feature gap: For many organizations, especially those in highly regulated industries, running Terraform plan and apply operations on self-hosted agents is a non-negotiable requirement. These agents provide the necessary security, compliance, and internal network access to manage sensitive infrastructure. However, until now, teams were unable to run their Terraform module tests within these same controlled environments. This forced teams to use a clumsy and fragmented workflow, requiring separate testing setups that introduced environmental inconsistencies, increased operational overhead, and created potential security and compliance gaps.

What’s new: We've closed this gap by introducing support for running Terraform module tests directly on your self-hosted agents for HCP Terraform Premium and Terraform Enterprise. This critical enhancement allows you to consolidate your entire infrastructure workflow from development and testing to planning and applying — all within your secure, controlled agent infrastructure.

Benefits: This feature is a massive boost in deployment confidence and a significant reduction in risk. By running tests in the exact same environment as your deployments, you eliminate the risk of issues only surfacing late in the process, because the tests now accurately reflect your live production conditions.

You can validate your infrastructure modules against your actual internal resources and security policies before you ever attempt a terraform apply. This unified, secure platform simplifies operations, ensures compliance, and allows you to confidently deploy modules knowing they have been rigorously tested in their intended operational environment.

»Terraform search

Background: At HashiConf in September, we announced the public beta of a new end-to-end search workflow for HCP Terraform that enables users to discover and bulk-import resources. This bridges a long-standing gap for practitioners managing large, pre-existing cloud environments. Instead of toggling between consoles, writing ad-hoc import scripts, or manually reconciling state, teams can now search across their cloud footprint, identify resources by their Terraform identity, thanks to the resource identity framework introduced in Terraform 1.12, and import them in bulk with accuracy and context.

What’s new: Today, we are excited to announce the general availability of Terraform search workflows. With this GA release, the AWS and Azure providers are supported, and we’re actively expanding coverage across additional providers in upcoming releases.

To learn more, refer to our search and import documentation.

»Terraform migrate tool for workspaces to Stacks migration

Background: At HashiConf, we announced the general availability of Terraform Stacks, enabling customers to manage production workloads with a unified CLI experience and integrated CI/CD pipelines.

Feature gap: We understand that migrating existing Terraform workloads from workspaces to Stacks can be complex. A key challenge has been the lack of a clear, automated path to migrate existing Terraform workloads while maintaining state integrity and minimizing disruption.

What’s new: To simplify this process, we’re introducing a new capability in Terraform migrate 2.0, now available in public beta. This new release enables a CLI-driven migration workflow that automates the critical steps of the workspaces-to-Stacks transition, including:

  • Extracting configurations from existing workspaces
  • Generating valid Stack configurations that reflect workspace settings
  • Transferring Terraform state to the new Stack deployments
  • Creating and initializing the new Stack

Benefits: These capabilities significantly reduce manual effort, helping teams move to Stacks with confidence and control.

To learn more, check out our workspace-to-Stack migration documentation and step-by-step tutorial.

»Get started with HCP Terraform and Terraform Enterprise

You can try many of these new features now. If you are new to Terraform, sign up for an HCP account to get started today, and also check out our tutorials. HCP Terraform includes a $500 credit that allows users to quickly get started using features from any plan, including HCP Terraform Premium. Contact our sales team if you’re interested in trying our self-managed offering: Terraform Enterprise.

More posts like this