A Terraform provider for managing GPU instances and storage volumes on Shadeform, a unified platform for deploying and managing cloud GPUs across multiple cloud providers. For more information about what Shadeform is and how to use it, visit our public docs.
Add the provider to your Terraform configuration:
terraform {
required_providers {
shadeform = {
source = "shadeform/shadeform"
version = "~> 0.1.0"
}
}
}
Configure the provider with your Shadeform API key:
provider "shadeform" {
api_key = "YOUR_API_KEY"
}
You can also set the API key via environment variable:
export SHADEFORM_API_KEY="YOUR_API_KEY"
If you do that, make sure to set the api_key
to ""
# Initialize Terraform
terraform init
# Plan the changes
terraform plan
# Apply the changes
terraform apply
# Check the state
terraform show
# Destroy the resources
terraform destroy
Create a GPU instance:
resource "shadeform_instance" "test-instance" {
cloud = "scaleway"
region = "paris-france-1"
shade_instance_type = "H100"
name = "terraform-test-instance"
}
Create a persistent storage volume:
resource "shadeform_volume" "test-volume" {
cloud = "datacrunch"
region = "helsinki-finland-2"
name = "terraform-test-volume"
size_in_gb = 101
}
NOTE: Instances can take anywhere from 1 - 15 minutes on average to spin up with some evening taking upwards of 30-40 minutes. The
terraform apply
command won't finish until the instances are active (or errored out). There is a default timeout of 60 minutes.
Name | Version |
---|---|
terraform | >= 1.0 |
go | >= 1.21 |
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: Shadeform API Documentation
- Issues: GitHub Issues
- Email: [email protected]
See CHANGELOG.md for a list of changes and version history.