---
updatedAt: 2026-06-18T13:04:30.000Z
agentTools:
  projectIndex: https://docs.polytomic.com/llms.txt
---

# Importing your Polytomic workspace into Terraform

The Polytomic Importer tool offers an easy way to import everything in your Polytomic workspace into your Terraform HCL.

## Installation

Download the latest binary from the available releases: <https://github.com/polytomic/terraform-provider-polytomic/releases>.

## Usage

Run the importer to generate HCL terraform files to the specified output directory. The importer will generate a set of `.tf` files along with a shell script, `import.sh`.

```shell
polytomic-importer run --api-key <API KEY> --output <DIRECTORY>
```

Initialize the provider and import the generated terraform resources into state using the generated shell script.

```Text shell
cd ${DIRECTORY}
terraform init
./import.sh
```

Finally, run apply to ensure any datasources and outstanding state is synchronized.

```Text shell
terraform apply
```

> 🚧 Changes in plan
>
> Some resources may be marked as needed to be `updated in-place`  in the terraform plan. It is safe to apply those changes.

## GitHub Action

A GitHub Action to run the Polytomic Importer can be found on the GitHub Marketplace: <https://github.com/marketplace/actions/polytomic-terraform-sync>.

Polytomic also offers a [template repository ](https://github.com/polytomic/terraform-sync-template) for running periodic imports to keep the UI and Terraform configuration in sync.