Skip to main content

HCP Terraform adds run queue visibility and new ephemeral workspace features

HCP Terraform and Terraform Enterprise gain new features related to ephemeral workspaces along with run queue visibility for HCP Terraform specifically.

In the past few months, the HashiCorp Terraform team launched a slew of improvements to help platform teams simplify and streamline their IT operations so they can increase developer velocity and cut costs for organizations. The new HCP Terraform improvements include:

  • Queue visibility for HCP Terraform (GA)
  • Project-scoped ephemeral workspaces for HCP Terraform Plus (GA)
  • Ephemeral workspace management with the Terraform provider for HCP Terraform Plus and Terraform Enterprise (GA)

»Run queue visibility

In the past, when Terraform runs queued up, it could be challenging for the platform engineers to identify which runs across various workspaces were causing bottlenecks. Run queue visibility for HCP Terraform (available for Terraform Enterprise soon) provides platform teams the tools and visibility to see the activity of all runs in the organization so platform engineers can easily and quickly figure out which runs are running or queued at any point in time and take remedial actions when necessary.

This feature shows an org-level view of runs across workspaces, agent pools, and run operation types, with the ability to filter by different dimensions. So when making high-priority infrastructure changes, platform engineers can easily determine where their changes are in the run queue and quickly find out if the platform is being unresponsive and causing stuck runs.

The updated organization runs view displays all pending runs with advanced filtering.

The updated organization runs view displays all pending runs with advanced filtering.

»Project-scoped ephemeral workspaces

Platform teams need to support self-service provisioning for developers, but temporary sandboxes and development environments drive up cloud costs when left running past their intended life. Ephemeral workspaces enable automatic destruction of resources, however, they have to be configured on every workspace. Applying auto-destroy settings to all current and new workspaces in a project required manual effort or custom API scripting.

With the new project-scoped auto-destroy settings for HCP Terraform, project admins can set a default inactivity timeframe for the workspaces in a project. All new and existing workspace created via self-service workflows in the project will inherit this setting as their default auto-destroy configuration while allowing individual workspace owners to override for fine-grained control. This ensures that temporary resources are cleaned up to reduce cloud costs and manual configuration burden.

Learn more on the managing projects documentation page.

»Manage ephemeral workspaces with the Terraform TFE provider

We recommend platform teams use the Terraform TFE provider to manage their HCP Terraform and Terraform Enterprise resources. With the latest TFE provider, you can configure the auto-destroy time-to-live settings on workspaces.

The following Terraform example configures the website-main-dev workspace to automatically destroy its resources after seven days of inactivity. This saves your team money by ensuring that resources in development environments are cleaned up when unused.

resource "tfe_workspace" "app-dev" {
  name        = "website-main-dev"
  tag_names   = ["dev", "app"]
  description = "Temporary web resources for dev team."
 
  auto_destroy_activity_duration = "7d"
}

With version 0.57 of the provider for HCP Terraform and Terraform Enterprise, ephemeral workspace settings can now be managed via the organization’s existing, provider-driven workspace management practices. Admins can define a workspace's auto-destroy settings using the auto_destroy_activity_duration or auto_destroy_at attributes of the tfe_workspace resource. Now, teams can more easily self-manage and save costs at scale by cleaning up their workspace resources.

»Get started with HCP Terraform

These HCP Terraform and Terraform Enterprise enhancements represent a continued effort to help customers maximize their infrastructure investments and accelerate application delivery by optimizing their infrastructure lifecycle management.

To learn more about these features, visit our 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.