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.
Requirements
Section titled “Requirements”- OpenTofu >= 1.11
- A running Fundament instance and an API key
Configuration
Section titled “Configuration”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.
Resources
Section titled “Resources”| 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 sources
Section titled “Data sources”| 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 |
Example
Section titled “Example”data "fundament_clusters" "all" {}
output "cluster_names" { value = [for c in data.fundament_clusters.all.clusters : c.name]}See also
Section titled “See also”- Getting started: the same steps in the console.
- API keys: creating the key the provider authenticates with.