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.
What the provider is for
Section titled “What the provider is for”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
Resource model
Section titled “Resource model”Resources
Section titled “Resources”| Resource | What it manages |
|---|---|
kupe_cluster | Managed clusters |
kupe_secret | Platform secrets and cluster sync targets |
kupe_tenant_member | Tenant membership and role assignment |
kupe_api_key | Machine-to-machine credentials |
Data sources
Section titled “Data sources”| Data source | What it reads |
|---|---|
kupe_tenant | Tenant metadata and plan settings |
kupe_cluster | Existing cluster details |
kupe_plan | Plan and pricing metadata |
Typical workflow
Section titled “Typical workflow”- Configure the provider with host, tenant, and credentials.
- Define the resources you want in HCL.
- Run
terraform plan. - Review the change.
- Run
terraform apply.
This is the right path when you want the platform layer itself to be managed through source control and change review.
Quick start
Section titled “Quick start”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" }}export KUPE_API_KEY="kupe_abc123_your-key-here"terraform initterraform planterraform applyWhen to use Terraform vs API
Section titled “When to use Terraform vs API”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