Skip to content

Terraform Provider

The Kupe Terraform provider exposes clusters, secrets, tenant membership, and API keys as kupe_* resources, so the platform layer lives in the same HCL as everything else you provision. 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
kupe_alertmanager_receiverAlertmanager notification receivers
kupe_alertmanager_routesAlertmanager routing tree for alert notifications
kupe_alertmanager_globalAlertmanager global configuration
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.

Reach for this workflow when the platform layer itself needs to live under source control and change review, alongside the rest of your infrastructure.

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"
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