---
name: schematics-compact-download
title: Downloading compact Git repositories
description: Schematics workspaces act as a container of a Terraform template with the input data, output state, jobs, and job log files. The workspace uses the Git URL of the Terraform template. For example, if the user provides the URL `https://github.com/terraform-ibm-modules/terraform-ibm-database/tree/main/examples/simple-etcd` to download and securely store the template files. The default execution of the Schematics is to download the whole Git repository and to save securely. Schematics assumes that the Terraform templates have relative references to modules, script, or data files that reside in other folders in the repository.
last-updated: 2026-07-07
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/schematics?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Downloading compact Git repositories
{: #compact-download}

Schematics workspaces act as a container of a Terraform template with the input data, output state, jobs, and job log files. The workspace uses the Git URL of the Terraform template. For example, if the user provides the URL `https://github.com/terraform-ibm-modules/terraform-ibm-database/tree/main/examples/simple-etcd` to download and securely store the template files. The default execution of the Schematics is to download the whole Git repository and to save securely. Schematics assumes that the Terraform templates have relative references to modules, script, or data files that reside in other folders in the repository.

However, sometimes, the user may be aware that the Terraform templates are isolated to a specific folder and its `sub directory`, for example, `examples/simple-etcd` in the Git repository. Now the user wants the workspace to download, only the relevant files from the Git repository. This can be achieved by using the **compact download** feature. The compact download feature improves the time it takes to download, and process the files from the Git repository while creating, or updating the workspace.

## Using compact download
{: #compact-active}

You can activate **compact download** feature through `console` by unchecking the `Download entire repo` checkbox on the [Create a Schematics workspace page](https://cloud.ibm.com/schematics/workspaces/create). By default, the checkbox is selected to download the full Git repository.

You can also activate **compact download** through the `API or CLI` by using `compact` field in the workspace [create](https://cloud.ibm.com/apis/schematics#create-workspace), or [update](https://cloud.ibm.com/apis/schematics#replace-workspace) payload, as illustrated in the code block.

```json
{
        "name": "Testmyservice",
        "type": [
                "terraform_v1.4"
        ],
        "description": "Create Terraform workspace to test compact feature",
        "tags": [
                "test:bbbranch"
        ],
        "template_repo": {
                "url": "https://github.com/IBM-Cloud/terraform-provider-ibm/tree/master/examples/ibm-resource-instance"
        },
        "template_data": [{
                "folder": ".",
                "compact": true,
                "type": "terraform_v1.4"
    }]
}

```
{: pre}

## Note
{: #compact-note}

- In case the **compact** field is not specified in the workspace create request payload, the default execution is `full repository download` or `compact : false`.
- In case the **compact** field is absent in the workspace update request payload, the default execution uses the previous `compact` setting.
- Git repository URL is mandatory in both [create](https://cloud.ibm.com/apis/schematics#create-workspace), or [update](https://cloud.ibm.com/apis/schematics#replace-workspace) workspace request payload only if compact flag is set.
- The [GET workspace](https://cloud.ibm.com/apis/schematics#get-workspace) response includes the compact field, only if the **compact** download mode is enabled.
- If the Git repository URL is the root of the repository, as stated in this [template](https://github.com/Cloud-Schematics/LEMP), the compact download, and full download are the exact same thing. It doesn't matter if the compact checkbox is `checked` or `unchecked`.