New Features for HCP Terraform: Run Queue Visibility and Ephemeral Workspaces

NewsNew Features for HCP Terraform: Run Queue Visibility and Ephemeral Workspaces

In recent months, the team at HashiCorp has introduced several significant enhancements to their Terraform platform, designed to streamline IT operations and boost developer productivity while reducing costs for organizations. These improvements to HCP (HashiCorp Cloud Platform) Terraform include:

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

    Run Queue Visibility

    Previously, when multiple Terraform runs queued up, platform engineers often faced difficulties in identifying which runs were causing delays across various workspaces. The new run queue visibility feature for HCP Terraform provides platform teams with tools and insights to monitor all run activities within the organization. This allows engineers to quickly determine which runs are currently executing or in the queue, facilitating prompt remedial actions when necessary.

    This feature offers an organizational view of runs across workspaces, agent pools, and operation types, with advanced filtering capabilities. This helps platform engineers prioritize critical infrastructure changes by determining their position in the run queue and identifying any unresponsive elements that may be causing delays.

    ![The updated organization runs view displays all pending runs with advanced filtering.](https://www.hashicorp.com/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1726598465-run-queue-blog.png&w=3840&q=75)

    Project-Scoped Ephemeral Workspaces

    Supporting self-service provisioning for developers is crucial for platform teams, but temporary sandboxes and development environments can lead to increased cloud costs if left running beyond their intended lifespan. While ephemeral workspaces allow for automatic resource destruction, they must be configured for each workspace individually. This manual process or custom API scripting can be time-consuming and error-prone.

    The new project-scoped auto-destroy settings for HCP Terraform simplify this process. Project administrators can now set a default inactivity period for all the workspaces within a project. This means that any new or existing workspace created through self-service workflows in the project will automatically inherit this default auto-destroy configuration. Individual workspace owners can still override these settings for more precise control. This ensures that temporary resources are automatically cleaned up, reducing cloud costs and lessening the manual configuration burden.

    For more information, visit the [managing projects documentation page](https://developer.hashicorp.com/terraform/cloud-docs/projects/managing#automatically-destroy-inactive-workspaces).

    Manage Ephemeral Workspaces with the Terraform TFE Provider

    Platform teams are encouraged to use the [Terraform TFE provider](https://registry.terraform.io/providers/hashicorp/tfe/latest) to manage HCP Terraform and Terraform Enterprise resources. The latest version of the TFE provider introduces the ability to configure auto-destroy time-to-live settings on workspaces.

    Here is a sample Terraform configuration that sets the `website-main-dev` workspace to automatically destroy its resources after seven days of inactivity. This helps save costs by ensuring that development environment resources are cleaned up when not in use.

    “`hcl
    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](https://registry.terraform.io/providers/hashicorp/tfe/latest), you can now manage ephemeral workspace settings using the organization’s existing, provider-driven workspace management practices. Administrators can define a workspace’s auto-destroy settings using the `auto_destroy_activity_duration` or `auto_destroy_at` attributes of the [tfe_workspace resource](https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/resources/workspace). This allows teams to efficiently self-manage and reduce costs at scale by cleaning up unused workspace resources.

    Get Started with HCP Terraform

    These enhancements to HCP Terraform and Terraform Enterprise underscore HashiCorp’s ongoing commitment to helping customers maximize their infrastructure investments and accelerate application delivery by optimizing the infrastructure lifecycle management.

    To explore these features further, check out the [Terraform guides and documentation on HashiCorp Developer](https://developer.hashicorp.com/terraform). For those new to Terraform, you can [sign up for HCP Terraform](https://app.terraform.io/public/signup/account) and start for free today.

    By implementing these new features, organizations can ensure more efficient use of their cloud resources, streamline their IT operations, and ultimately accelerate their software development processes. This continuous improvement in the Terraform ecosystem demonstrates HashiCorp’s dedication to providing robust, scalable solutions for modern IT infrastructure management.

For more Information, Refer to this article.

Neil S
Neil S
Neil is a highly qualified Technical Writer with an M.Sc(IT) degree and an impressive range of IT and Support certifications including MCSE, CCNA, ACA(Adobe Certified Associates), and PG Dip (IT). With over 10 years of hands-on experience as an IT support engineer across Windows, Mac, iOS, and Linux Server platforms, Neil possesses the expertise to create comprehensive and user-friendly documentation that simplifies complex technical concepts for a wide audience.
Watch & Subscribe Our YouTube Channel
YouTube Subscribe Button

Latest From Hawkdive

You May like these Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.