Skip to content

OpenTofu provider

The Fundament provider lets you manage clusters and project members declaratively with OpenTofu or Terraform, instead of clicking through the console or scripting the CLI.

The provider README is the canonical reference for every argument and attribute; this page is an orientation.

  • OpenTofu >= 1.11
  • A running Fundament instance and an API key
terraform {
required_providers {
fundament = {
source = "fundament/fundament"
}
}
}
provider "fundament" {
endpoint = "https://organization-api.example"
api_key = var.fundament_api_key # or set FUNDAMENT_API_KEY
}
Argument Description Required
endpoint URL of the Fundament organization API Yes
api_key API key; may also come from FUNDAMENT_API_KEY Yes
authn_endpoint URL of the authentication API. Derived from endpoint when omitted; may also come from FUNDAMENT_AUTHN_ENDPOINT No

Keep the key out of your configuration and state: pass it through FUNDAMENT_API_KEY or a variable backed by your secret store. The provider exchanges the API key for a short-lived token and refreshes it as needed.

Resource Manages
fundament_cluster A managed Kubernetes cluster. See Clusters
fundament_project_member A user’s membership of a project. See Members and roles
Data source Reads
fundament_clusters All clusters in the organization, optionally filtered by project
fundament_cluster A single cluster by ID
fundament_project_members The members of a project
data "fundament_clusters" "all" {}
output "cluster_names" {
value = [for c in data.fundament_clusters.all.clusters : c.name]
}