Skip to content

Terraform Provider

The Kupe Terraform provider lets you manage tenant-scoped platform resources as code. Use it when you want reviewable, repeatable workflows for clusters, secrets, members, and API keys instead of manual changes in the console.

It works with both Terraform and OpenTofu.

The provider is a good fit when you want to:

  • provision clusters from HCL
  • manage secret sync targets declaratively
  • manage tenant membership as part of environment setup
  • create automation credentials for CI and platform workflows
ResourceWhat it manages
kupe_clusterManaged clusters
kupe_secretPlatform secrets and cluster sync targets
kupe_tenant_memberTenant membership and role assignment
kupe_api_keyMachine-to-machine credentials
Data sourceWhat it reads
kupe_tenantTenant metadata and plan settings
kupe_clusterExisting cluster details
kupe_planPlan and pricing metadata
  1. Configure the provider with host, tenant, and credentials.
  2. Define the resources you want in HCL.
  3. Run terraform plan.
  4. Review the change.
  5. Run terraform apply.

This is the right path when you want the platform layer itself to be managed through source control and change review.

terraform {
required_providers {
kupe = {
source = "kupecloud/kupe"
}
}
}
provider "kupe" {
host = "https://api.kupe.cloud"
tenant = "my-tenant"
}
resource "kupe_cluster" "production" {
name = "production"
display_name = "Production"
type = "shared"
version = "1.31"
resources = {
cpu = "4"
memory = "16Gi"
storage = "100Gi"
}
}
Terminal window
export KUPE_API_KEY="kupe_abc123_your-key-here"
terraform init
terraform plan
terraform apply

Use Terraform when you want:

  • declarative state
  • plan/apply review
  • a consistent infrastructure-as-code workflow

Use the API when you want:

  • custom scripting
  • direct integration logic
  • request/response style automation