Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Connectors and Variables
description: Learn how to configure connectors, environment variables, OpenTofu/Terraform variables, and variable files in your IaCM workspace.
sidebar_position: 10
redirect_from: "/docs/infra-as-code-management/project-setup/input-variables"
---

import Tabs from "@theme/Tabs";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A workspace is a named environment that stores Terraform configurations, variabl

Users can define a Terraform configuration with multiple workspaces to enforce the same desired configuration. Each workspace creates a different state with its own independent lifecycle.

For example, you can have a single configuration of a Kubernetes cluster and create multiple workspaces out of it, each leading to different clusters. The configuration is unique to each workspace and can be managed through environment or Terraform variables.
For example, you can have a single configuration of a Kubernetes cluster and create multiple workspaces out of it, each leading to different clusters. The configuration is unique to each workspace and can be managed through environment or OpenTofu/Terraform variables.

## Workspace statuses
A workspace can have one of the following statuses:
Expand Down Expand Up @@ -102,4 +102,8 @@ Harness supports workspace cloning for quick setup of new workspaces with the sa
</TabItem>
</Tabs>

Go to [provision workspace](/docs/infra-as-code-management/workspaces/provision-workspace) to learn how to provision workspaces.
## Workspace templates
Create reuseable workspace templates to standardize your workspace configurations across projects. Go to [workspace templates](/docs/infra-as-code-management/workspaces/workspace-templates) to learn how to create and manage workspace templates.

## Next step
Once you have created your workspace, by creating a new workspace from scratch, cloning, or using a template, you can [provision](/docs/infra-as-code-management/workspaces/provision-workspace) it to apply your OpenTofu or Terraform state.
20 changes: 10 additions & 10 deletions docs/infra-as-code-management/workspaces/delete-workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_position: 90
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

In cases where your workspace has become redundant and you no longer need it, you can delete it from your Harness account. As a safeguard, Harness have several confirmation steps to ensure that workspaces aren't mistakenly deleted.
In cases where your workspace has become redundant, and you no longer need it, you can delete it from your Harness account. As a safeguard, Harness has several confirmation steps to ensure that workspaces aren't mistakenly deleted.

:::warning
Deleting a workspace will remove your workspace, along with it's associated state file from Harness, but will not remove any of your resources.
Expand All @@ -34,17 +34,17 @@ Resources are only destroyed if you run your workspace through [a destroy pipeli
allowfullscreen="allowfullscreen"></iframe>
</TabItem>
<TabItem value="API">
If your workspace already has an `inactive` status, you can delete a workspace via the [Harness API destroy-workspace endpoint](https://apidocs.harness.io/tag/workspaces#operation/workspaces_destroy-workspace).
If your workspace already has an `inactive` status, you can delete a workspace via the [Harness API destroy-workspace endpoint](https://apidocs.harness.io/openapi-merged/workspaces/workspaces_destroy-workspace).

```bash
curl -i -X DELETE \
'https://app.harness.io/iacm/api/orgs/{org}/projects/{project}/workspaces/{identifier}' \
-H 'Harness-Account: <YOUR_HARNESS_ACCOUNT_ID>' \
-H 'x-api-key: <YOUR_API_KEY_HERE>'
https://apidocs.harness.io/openapi-merged/iacm/api/orgs/{org_id}/projects/{project_id}/workspaces/{workspace_id} \
-H 'Harness-Account: {harness_account_id}' \
-H 'x-api-key: {api_key}'
```
---
:::info deactivate workspace
If your workspace is still active, deactivate it before calling the above endpoint with a [destroy-workspace pipeline](/docs/infra-as-code-management/workspaces/destroy-workspaces).
:::
</TabItem>
---
:::info deactivate workspace
If your workspace is still active, deactivate it before calling the above endpoint with a [destroy-workspace pipeline](/docs/infra-as-code-management/workspaces/destroy-workspaces).
:::
</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ The difference between these options is as follows:
## Configure Workspace Templates
To configure workspace templates and standardize your workspace setups, follow this interactive guide:

<Tabs>
<TabItem value="Create workspace templates">
<Tabs groupId="step" queryString>
<TabItem value="1. Create workspace templates">
<DocVideo src="https://app.tango.us/app/embed/6686c1ea-fb9b-4a94-ad1e-021c34b8a19f?skipCover=false&defaultListView=false&skipBranding=false&makeViewOnly=true&hideAuthorAndDetails=true" title="Creating an IaCM workspace template in Harness" />
</TabItem>
<TabItem value="Add variables & edit templates">
<TabItem value="2. Add variables & edit templates">
<DocVideo src="https://app.tango.us/app/embed/ceb4cbae-aae8-40d5-8b68-70e72cd4a7cf?skipCover=false&defaultListView=false&skipBranding=false&makeViewOnly=true&hideAuthorAndDetails=true" title="Adding variables to your Harness IaCM workspace template" />
</TabItem>
<TabItem value="Apply templates">
<TabItem value="3. Apply templates">
<DocVideo src="https://app.tango.us/app/embed/fb4819c2-3985-48da-90f4-1db8ae839fc5?skipCover=false&defaultListView=false&skipBranding=false&makeViewOnly=true&hideAuthorAndDetails=true" title="Apply Harness IaCM workspace templates to your new workspace." />
</TabItem>
<TabItem value="Step-by-step">
<TabItem value="Full step-by-step">
Follow these steps to:

- Create and review a new workspace template.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ In this tutorial, we will setup the following resources:
In the following steps, we will create an IaCM Workspace template and default pipelines to provision and destroy infrastructure - in this case, a Kubernetes namespace.

#### 1. Create a new Workspace Template
We need a **workspace template** to standardize IaCM workspace configurations by predefining essential variables, configuration settings, and other workspace options. Go to [Workspace Templates](/docs/infra-as-code-management/workspaces/workspace-tempates/) to learn more.
We need a **workspace template** to standardize IaCM workspace configurations by predefining essential variables, configuration settings, and other workspace options. Go to [Workspace Templates](/docs/infra-as-code-management/workspaces/workspace-templates/) to learn more.

Follow the instructions below to create a new workspace template:
1. Go to Project Settings and under “Project-level Resources”, choose “Templates”.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ A Component in IDP Catalog represents a service or any other type of software co
IaCM Workspace is a container for your infrastructure resources. It integrates IaC code, variables, cloud provider connections, state files, and workflows. In Terraform, each workspace has its own state file, which tracks the status of its managed resources. Go to [Workspaces](/docs/category/workspaces) to learn more.

### Workspace Templates
With IaCM Workspace Templates, you can standardize workspace configurations across your projects by predefining essential variables, configuration settings, and other workspace options. Go to [Workspace Templates](/docs/infra-as-code-management/workspaces/workspace-tempates) to learn more.
With IaCM Workspace Templates, you can standardize workspace configurations across your projects by predefining essential variables, configuration settings, and other workspace options. Go to [Workspace Templates](/docs/infra-as-code-management/workspaces/workspace-templates) to learn more.



Expand Down
2 changes: 1 addition & 1 deletion src/components/Roadmap/data/iacmData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const IacmData: Horizon = {
tag: [{ value: "Simplify Onboarding" }],
title: "Workspace templates",
description: "Users will be able to create Workspaces that will inherit cost, OPA, and other configurations from templates, simplifying onboarding and enforcing best practices",
link: "/docs/infra-as-code-management/workspaces/workspace-tempates",
link: "/docs/infra-as-code-management/workspaces/workspace-templates",
},
{
tag: [{ value: "Reports & Insights" }],
Expand Down