Terraform provider
Automating Infrastructure Management with CAST AI's Terraform Provider
CAST AI offers a Terraform provider to automate the management of your Kubernetes infrastructure. You can find our provider in the Terraform Registry.
For detailed installation steps, example projects, and release information, please visit our GitHub repository.
Setting Up API Access for Terraform
For long-term use with Terraform-managed clusters, you must use a Full Access API Key. To obtain this key:
- Log in to the CAST AI UI
- Navigate to the API Key section
- Create a new Full Access API Key
For detailed instructions, refer to our authentication documentation.
Integrating Terraform with GitOps
When managing your cloud infrastructure using Terraform and GitOps, consider the following examples for different Kubernetes distributions:
- AKS and CAST AI GitOps onboarding flow
- EKS and CAST AI GitOps onboarding flow
- GKE and CAST AI GitOps onboarding flow
These examples demonstrate how to onboard your cluster to CAST AI using a GitOps approach. In these scenarios, CAST AI Node Configuration, Node Templates, and Autoscaler policies are managed using Terraform. However, you can install other components such as:
- castai-agent
- castai-cluster-controller
- castai-evictor
- castai-spot-handler
- castai-kvisor
using alternative tools like ArgoCD, manual Helm releases, or other preferred methods.
By following this guide, you can effectively automate your Kubernetes infrastructure management and optimize costs using CAST AI's Terraform provider and GitOps practices.
Updated 5 months ago