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.


Download the latest binary from the available releases:


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,

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.

cd ${DIR}
terraform init

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

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:

Polytomic also offers a template repository for running periodic imports to keep the UI and Terraform configuration in sync.

What’s Next