- CoreWeave AI Object Storage.
- OIDC Workload Identity Federation for Object Storage (instead of static CoreWeave API keys).
Prerequisites
- A CoreWeave account with a CoreWeave API token (create one in Console).
kubectl(required for Node Pools and DFS volumes and optional for Object Storage).- The kubeconfig you downloaded at the end of Phase 1.
Node Pools and DFS volumes
Node Pools and DFS PVCs are managed as Kubernetes manifests, so Terraform needs the kubeconfig you downloaded at the end of Phase 1.Your CoreWeave user or API token must have the CKS Admin IAM role. See the prerequisites.
Configuration
In this section, you’ll set the kubeconfig path and enable Node Pools and DFS volumes.Set the kubeconfig path
Interraform.tfvars, set the path to the kubeconfig you downloaded at the end of Phase 1:
Enable Node Pools and DFS
To enable Node Pools and DFS volumes, set the following variables in yourterraform.tfvars file:
Create and verify your Node Pools and DFS volumes
In this section, you’ll apply your Terraform configuration to create your Node Pools and DFS volumes.Apply your Terraform configuration
To enable Node Pools and DFS volumes, plan and apply your changes:Verify outputs
Afterterraform apply completes, verify the outputs to confirm your Node Pools and DFS volumes are in place:
Optional: Add Object Storage
The Object Storage module is an optional add-on that creates an Object Storage bucket with organization-level and optional bucket-level access policies. Object Storage resources don’t require kubeconfig and can be included in either Phase 1 or Phase 2.Your user or API token must have the Object Storage Admin IAM role. See the prerequisites.
Configure Object Storage access policies
In this section, you’ll configure the Object Storage access policies for your Object Storage bucket. You need at least one organization access policy before creating buckets. Bucket access policies are optional. The following policies are available in yourterraform.tfvars file (copied from the terraform.tfvars.example file) as examples. Edit them to suit your needs.
Organization access policies
Theobject_storage_org_access_policies variable is a map (key = policy name), so you can create multiple policies for different concerns. At least one organization access policy must exist before creating buckets.
Open access (single policy)
A single policy granting full S3 and Object Storage API access to every principal in the organization. Suitable for development or test environments, or single-team setups where all users share the same level of access:Scoped access (multiple policies)
Separate policies for different access patterns with named principals, least-privilege actions, independently manageable and auditable:Optional: Bucket access policies
Bucket access policies add fine-grained, S3-compatible access control for a single bucket. They are evaluated after organization access policies. Manage them with theobject_storage_bucket_policy_statements variable.
Create a bucket
To create your Object Storage bucket, follow these steps:-
Set the bucket variables in
terraform.tfvars:Bucket naming rules
Bucket names must be globally unique and adhere to the following rules:- Length: 3 to 63 characters.
- Characters: Only lowercase letters (
a-z), numbers (0-9), and hyphens (-). No dots, uppercase letters, underscores, spaces, or other special characters. - Start and end: Must begin and end with a letter or number. Cannot start or end with a hyphen (
-). - Prohibited patterns: Cannot start with
xn--. - Reserved: Must not begin with
cw-,vip-, orlog-stitcher-ch-. Must not be the exact nameint. CoreWeave reserves these for internal use.
-
To create your Object Storage bucket, plan and apply your changes:
-
After
terraform applycompletes, verify the outputs to confirm your Object Storage bucket is in place:
OIDC Workload Identity Federation for Object Storage
For production environments, OpenID Connect (OIDC) Workload Identity Federation (WIF) eliminates static API keys by exchanging short-lived JSON Web Tokens (JWT) from your identity provider for temporary Object Storage credentials. CKS clusters expose an OIDC issuer URL for Kubernetes service account tokens. After Phase 1 completes, retrieve this URL from the Terraform output:Creating a WIF configuration requires the IAM Admin role. WIF configurations don’t have a Terraform resource. Create them in Console > Organization > IAM > Workload Federation.
Migrate from an older repository layout
If you previously hadobject_storage.tf, nodepool.tf, or dfs.tf at the root level and are updating to the module layout, Terraform plans to destroy and recreate those resources unless you move state. After pulling the new layout, move state for these resources once:
terraform plan to confirm no changes for those resources.