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
Install
Section titled “Install”The provider is not published to a registry. Prebuilt packages for Linux
(amd64, arm64), macOS (Apple Silicon) and Windows (amd64) are published to the
rolling terraform-provider-latest release, named so that OpenTofu finds them
in its local plugin directory without any CLI configuration:
# Pick your platform: linux_amd64, linux_arm64 or darwin_arm64PLATFORM=linux_amd64MIRROR=~/.terraform.d/plugins/registry.opentofu.org/fundament/fundamentmkdir -p "$MIRROR"curl -fsSL -o "$MIRROR/terraform-provider-fundament_0.1.0_${PLATFORM}.zip" \ "https://github.com/fundament-oss/fundament/releases/download/terraform-provider-latest/terraform-provider-fundament_0.1.0_${PLATFORM}.zip"Keep the zip as downloaded: its name is how OpenTofu discovers the version and platform. Windows, Terraform instead of OpenTofu, checksums and updating to a newer build are covered in the provider README.
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.