Skip to main content

New in HCP Terraform: Linked Stacks, enhanced tags, and module lifecycle management GA

Module lifecycle management goes GA, linked Terraform Stacks simplify cross-Stack dependency management, and enhanced tags ease tag management at scale.

In the past few months, the HashiCorp Terraform engineering team continuously improved on our features to help platform teams simplify and streamline their IT operations, increasing developer velocity and reducing risks for their organizations. The latest HCP Terraform improvements include:

  • Linked Stacks (Beta)
  • Enhanced tags (Beta)
  • Module lifecycle management (GA)

»Linked Stacks

Managing dependencies between infrastructure components can be challenging, especially when different parts of your infrastructure have distinct lifecycles. Customers often struggle to decide how to organize their infrastructure, particularly when shared services, like networking, need to be consumed by multiple applications. Without a clear way to manage these dependencies, teams are left with manual workflows, increased complexity, and the risk of misconfigurations.

To address this, we’re introducing linked Stacks to the Terraform Stacks beta for all HCP Terraform plans based on resources under management (RUM). This new feature simplifies cross-Stack dependency management in HCP Terraform, allowing you to securely share outputs from one Stack (the upstream Stack) with another Stack (the downstream Stack).

For example, you can manage a shared networking service, such as a VPC and its subnets, in a dedicated upstream Stack and link it to downstream application Stacks that consume the necessary outputs. This ensures consistent configurations across Stacks while keeping your infrastructure modular and easier to manage.

Here’s how it works:

Upstream Stacks publish outputs using the new publish_output block, making specific values (e.g., vpc_id, subnet IDs) available for downstream use.

publish_output "vpc_id" {
  description = "Description of the purpose of this output"
  value       = deployment.network.vpc_id
}

Downstream Stacks consume these outputs using the upstream_input block, referencing the published values as inputs for their deployments.

upstream_input "networking_stack" {
  type   = "stack"
  source = "app.terraform.io/hashicorp/Default Project/my-stack"
}
 
deployment "application" {
  inputs = {
    vpc_id = upstream_input.network_stack.vpc_id
  }
}

When an upstream Stack’s outputs change, HCP Terraform automatically triggers updates in any downstream Stacks that depend on those outputs, ensuring your infrastructure stays in sync without manual intervention.

Linked Stacks help platform teams reduce complexity, improve modularity, and automate cross-Stack updates, making it easier to manage infrastructure dependencies at scale. To learn more, please refer to our documentation.

»Enhanced tags

Tags provide visibility and organization by assigning and grouping workspaces by purpose, owner, environment, or other criteria. Additionally, customers can apply Sentinel policies dynamically based on whether or not a specific tag has been applied to a workspace.

Although single-value tags gave customers a quick and easy way to search and filter workspaces, when it comes to more complex categorization, single-value tags are insufficient to group and manage workspaces consistently. From a control perspective, the existing tags are easily overwritable, making them highly unreliable for governance and prone to human error. This made tags unusable for strategic use cases such as chargeback, workload and ownership attribution, and automation.

Today, we are excited to announce the public beta of the new enhanced tags for HCP Terraform. They include three primary enhancements:

  • Based on key-value pairs instead of single values
  • The ability to tag projects, which enables convenient workspace tagging at scale
  • Better control over adding and removing tags

These improvements will help customers do more FinOps management, automation, and governance with HCP Terraform while also fostering a more organized infrastructure management environment.

With enhanced tags, customers can configure reserved tags that are not overwritable, except by admins. And platform teams can now tag projects, which will propagate down to all of the workspaces in that project.

The expanded format allows customers to organize, classify, and retrieve information about their workspaces with more flexibility. For example, customers can scale up the tagging practices within HCP Terraform and use custom business dimensions to analyze, manage, and distribute the costs of infrastructure and Terraform itself.

Refer to the following documentation to start using enhanced tags:

»Module lifecycle management (GA)

Last October at HashiConf 2024, we introduced the public beta of module lifecycle management. Today, we are excited to announce that this suite of features is now generally available to help platform teams simplify the complexity of module version management and reduce its overhead while mitigating security and compliance risks.

To recap, module lifecycle management introduces a systematic way to provide visibility through saved views, improve communication with change requests and team notifications, and centralize lifecycle governance with module deprecation, which provides customized warnings about outdated module versions without interrupting the module lifecycle.

To learn more about each feature, refer to our documentation on module deprecation, change requests, and team notifications. Change requests, team notifications, and module deprecation are only available in the HCP Terraform Plus tier. Saved views are available for all Terraform plans based on RUM.

»Get started with HCP Terraform

We’re working to ensure HCP Terraform continues to deliver improvements that help customers have better visibility and control over their environment throughout their infrastructure lifecycle. To learn more about the new features described in this post, visit the Terraform guides and documentation on HashiCorp Developer. If you are new to Terraform, sign up for HCP Terraform and get started for free today.

Sign up for the latest HashiCorp news

By submitting this form, you acknowledge and agree that HashiCorp will process your personal information in accordance with the Privacy Policy.