Skip to main content

Workspace Settings

Your workspace serves as a centralized environment that seamlessly links your infrastructure code with the resources you provision. This document offers a comprehensive guide to each tab within your workspace, empowering you to efficiently manage resources, configurations, and integrations.

Prerequisites

new workspaces

If you are new to Harness IaCM, check out the onboarding guide to learn more about IaCM, supported frameworks like OpenTofu, and how to prepare your workspace with connectors to code repositories and cloud providers, as well as running pipelines against it to provision and store your infrastructure state.

Workspace tabs

This document walks through each tab of a workspace, explaining its data, settings, and usage to help you configure and manage your workspace effectively.

Resources

The Resources tab surfaces infrastructure state from OpenTofu/Terraform in a structured and readable format. It lists all managed resources, referenced data sources, and exposed outputs defined in your workspace configuration.

This tab includes three subtabs:

  • Resources: Infrastructure components actively provisioned and managed by OpenTofu/Terraform.
  • Data Sources: External values fetched at runtime (e.g., existing VPCs, AMIs). These are now extracted from the state file for easier visibility.
  • Outputs: Values exposed by your modules, typically used to pass data between pipeline stages or systems.

Use this tab to validate state, inspect dependencies, and troubleshoot issues, without digging through raw state files.

Variables

The Variables tab is populated from the variables defined within your infrastructure code, commonly in your variables.tf file.

info

Variables can be set in any of the following ways:

  • Explicit variables: You can state that exact value of the variable directly in your code.
  • Variable reference: You can set a variable value directly in the variables tab of your workspace and reference it with the var.variable_reference syntax in your OpenTofu/Terraform code.
  • Default values Setting default values acts as a fallback and prevents unexpected errors in cases where you referenced a variable that doesn't match any reference in your workspace variables, e.g. it is misspelled or has been manually removed.
  • Consider sensitive information: In some cases you may want to store a variable with sensitive information such as database passwords or other secret. In these cases, you can label your OpenTofu/Terraform code as sensitive = true
resource "aws_instance" "demo_ec2" {
instance_type = "t2.micro"
}

Activity History

The Activity History tab logs actions performed within the workspace, such as 'plan' and 'apply' steps executed via pipelines.

  • Usage: Use this tab to track the success or failure of specific actions, aiding in troubleshooting and auditing.

State

The State tab provides access to your complete infrastructure state file, offering critical insights into your current configuration and dependencies of your resources.

  • Usage: Utilize this tab to conduct audits and maintain consistency across your infrastructure setup, ensuring alignment with your desired state.

For detailed instructions on managing your infrastructure state, visit Provision workspace.


Configuration

Derived from the initial setup steps of your workspace, including cost estimation settings, selected connectors, and default pipelines.

  • Usage: Provides a quick overview of your workspace's configuration, allowing for easy edits and updates.

Advanced options

Workspaces configuration advanced options offer the ability to configure additional settings for your workspace, including:

  • Submodules: Use submodules from your repository's modules/ folder. Go to Submodule Usage for more information.
  • Sparse checkout: Provide paths to directories to do a sparse checkout on given patterns to clone specific directories from the repository.
    Refer to git documentation for more details.

CLI Integration

This tab provides guidance on integrating the OpenTofu/Terraform CLI with Harness as a backend.

  • Usage: It offers step-by-step instructions for setting up CLI integration, facilitating seamless management of your infrastructure code.

For step-by-step instructions on CLI integration, check out CLI Integration Guide.