Skip to content

Import Existing Resources

If you already have tenant resources created outside Terraform, usually through the console, import them so Terraform can manage them going forward.

Terminal window
terraform import kupe_cluster.production production
terraform import kupe_secret.db_password db-password
terraform import kupe_tenant_member.lead lead@example.com
terraform import kupe_api_key.cicd ak-abc123

Before you import, add the matching resource block to your configuration. After import, run terraform plan and adjust the configuration until it matches the imported state cleanly.

Importing a kupe_api_key works, but the key attribute is empty after import because the raw key value cannot be recovered from the platform.

If you need the raw key for CI or another secret store, revoke the imported key and create a new one with Terraform instead.

A common adoption flow:

  1. Add resource blocks for the objects you already have.
  2. Run terraform import for each resource.
  3. Run terraform plan and correct any drift.
  4. Commit the configuration and make later changes through Terraform.