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.
terraform import kupe_cluster.production productionterraform import kupe_secret.db_password db-passwordterraform import kupe_tenant_member.lead lead@example.comterraform import kupe_api_key.cicd ak-abc123Before 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 API keys
Section titled “Importing API keys”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.
Migrating from the console
Section titled “Migrating from the console”A common adoption flow:
- Add
resourceblocks for the objects you already have. - Run
terraform importfor each resource. - Run
terraform planand correct any drift. - Commit the configuration and make later changes through Terraform.