Manage the lifecycle of your bare-metal Kubernetes clusters on metalstack.cloud using Terraform.
Requirements
Building the provider
- Clone the repository
- Enter the repository directory
- Build the provider using the Go
install
command:
go install
Using the provider
First, let's add the provider to your project:
terraform {
required_providers {
metal = {
source = "metal-stack-cloud/metal"
}
}
}
To obtain an api token
for creating resources, visit metalstack.cloud. Head to the the Access Tokens
section and create a new one with the desired permissions, name and validity.
Note: Watch out to first select the desired organization and project you want the token to be valid for.
Configure the provider by providing your token:
provider "metal" {
api_token = "<YOUR_TOKEN>" # or set env METAL_STACK_CLOUD_API_TOKEN
# project will be derived from the api_token
}
Now you are ready to go! 🎉