> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/infrastructure-as-code-management/3.0/platform/workspaces/workspace-tabs.md).

# Workspace Settings

Your workspace links your infrastructure code with the resources you provision. This document covers each tab within your workspace, so you can manage resources, configurations, and integrations effectively.

### Before you begin <a href="#before-you-begin" id="before-you-begin"></a>

* A created workspace. Go to [Create/clone a workspace](/infrastructure-as-code-management/3.0/platform/workspaces/create-workspace.md) to create one.

{% hint style="info" %}
**NEW WORKSPACES**

If you are new to Harness IaCM, go to the [onboarding guide](/infrastructure-as-code-management/3.0/new-to-iacm/get-started.md) to review IaCM concepts, supported frameworks like [OpenTofu](https://opentofu.org/), 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.
{% endhint %}

### Workspace tabs <a href="#workspace-tabs" id="workspace-tabs"></a>

Each tab exposes a different part of your workspace. The sections below explain the data, settings, and usage for each one.

#### Insights <a href="#insights" id="insights"></a>

The Insights tab consolidates the actionable findings for a workspace, including resources that have drifted from your configuration and, when Cloud Cost Management is connected, cost optimization opportunities. From each insight, you can start a fix with the IaCM Remediation Agent. Go to [Insights](/infrastructure-as-code-management/3.0/platform/workspaces/insights.md) to review the tab, and [IaCM Remediation Agent](/infrastructure-as-code-management/3.0/platform/workspaces/remediation-agent.md) to remediate drift.

***

#### Resources <a href="#resources" id="resources"></a>

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 (for example, 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 and connectors <a href="#variables-and-connectors" id="variables-and-connectors"></a>

The **Variables and Connectors** tab lets you define the inputs and integrations required to run your IaCM workspace pipelines. These settings apply to operations such as `init`, `plan`, `apply`, or drift detection.

**Connectors**

Connectors allow your workspace to authenticate with cloud providers, Git repositories, or other external systems. For example, a Git connector may be required to fetch variable files, or a cloud connector (like `aws-oidc`) may be needed for provisioning infrastructure.

You can add connectors at the **Account**, **Project**, or **Organization** level.

**Variables**

Variables are used to inject configuration values into your infrastructure code. You can define:

* **Environment variables** for shell-level runtime config (for example, `TF_LOG`, `ENVIRONMENT`)
* **OpenTofu/Terraform variables** that map to `variable {}` blocks in your `.tf` files
* **Variable files** (`.tfvars`, `.json`, or `.yaml`) stored in Git and referenced at runtime

These values can be statically defined, prompted at runtime with `<+input>`, or injected from pipeline variables.

{% hint style="info" %}
**CONFIGURE CONNECTORS AND VARIABLES**

Go to [Configure Connectors and Variables](/infrastructure-as-code-management/3.0/platform/iacm-connectors-variables/connectors-variables.md) for setup instructions and YAML examples.

Variables can be set in any of the following ways:

* **Explicit variables:** State the exact value of the variable directly in your code.
* **Variable reference:** 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 a referenced variable does not match any reference in your workspace variables, for example, 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 secrets. In these cases, you can label your OpenTofu/Terraform code as `sensitive = true`.
  {% endhint %}

{% tabs %}
{% tab title="Explicit variable" %}

```hcl
resource "aws_instance" "demo_ec2" {
  instance_type = "t2.micro"
}
```

{% endtab %}

{% tab title="Variable reference" %}

```hcl
resource "aws_instance" "demo_ec2" {
  instance_type = var.instance_type
}
```

{% endtab %}

{% tab title="Default values & sensitive information" %}

```hcl
resource "aws_instance" "demo_ec2" {
  instance_type = var.instance_type
  db_password = var.db_password
}
variable "db_password" {
    description = "Database password"
    type = string
    sensitive = true
  }
```

{% endtab %}
{% endtabs %}

***

#### Activity history <a href="#activity-history" id="activity-history"></a>

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 <a href="#state" id="state"></a>

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

* **Usage:** Use this tab to conduct audits and maintain consistency across your infrastructure setup, ensuring alignment with your desired state.
* **State versions:** The State tab lists previous versions of your state file. Every run that stores state adds a new version, and all historical versions are retained.
* **State rollback:** From the State tab, you can roll back to any previous state version. Harness restores the selected version as a new version without modifying your cloud infrastructure. Go to [Roll back workspace state](/infrastructure-as-code-management/3.0/platform/workspaces/state-rollback.md) to restore a previous version.

Go to [Provision workspace](/infrastructure-as-code-management/3.0/platform/workspaces/provision-workspace.md) for detailed instructions on managing your infrastructure state.

***

#### Configuration <a href="#configuration" id="configuration"></a>

Derived from the initial setup steps of your workspace, including cost estimation settings, 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](https://developer.harness.io/infrastructure-as-code-management/3.0/platform/workspaces/pages/7JZ5nUaLadieFOb7vY3A#root\&submoduleusage) to configure them.
* **Sparse checkout:** Provide paths to directories to do a sparse checkout on given patterns to clone specific directories from the repository. Sparse checkout patterns apply to both module source directories and any referenced `.tfvars` variable files, so include the paths for every variable file your workspace consumes in addition to the module paths. Go to [Git sparse-checkout documentation](https://git-scm.com/docs/git-sparse-checkout#_internalscone_pattern_set) for the pattern syntax.

***

#### CLI integration <a href="#cli-integration" id="cli-integration"></a>

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.

Go to [CLI Integration Guide](/infrastructure-as-code-management/3.0/platform/workspaces/cli-integration.md) for step-by-step instructions on CLI integration.

***

### FAQs <a href="#faqs" id="faqs"></a>

<details>

<summary>What happens when I roll back workspace state?</summary>

Harness restores the selected version as a new version without modifying your cloud infrastructure. Go to Roll back workspace state for the full procedure.

</details>

<details>

<summary>At what levels can I configure connectors for a workspace?</summary>

You can add connectors at the Account, Project, or Organization level.

</details>
