Terraform quickstarter for a Digitalocean Kubernetes cluster
In order to access the Digitalocean API you need to set an environement variable in your shell.
export DIGITALOCEAN_ACCESS_TOKEN=<personal access token>
In order to use the module you need to know the names of images and regions. The API provides all information:
curl -X GET --silent "https://api.digitalocean.com/v2/images?per_page=999" -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN" |jq '.'
module "cluster" {
source = "git::git@github.com:mijndert/wheel.git"
cluster_name = "example"
cluster_region = "fra1"
node_size = "s-2vcpu-2gb"
node_count = 3
}
- Add optional autoscaling
- State management