Skip to content
SHC Docs

Example: scaleway-shc

terraform/examples/scaleway-shc builds one node in the group the root names compose and three workers on a Scaleway private network. Scaleway has no load balancer provider in SHC and its DNS hosts only apex zones, so DNS goes through Cloudflare and there is no lb topology.

  • The provider block takes the access key, secret key and project id from variables; region and zone are both set, because the private network is regional and the instances are zonal.
  • assign_flexible_ips = true gives every node a public address of its own.
  • root_volume.type = "sbs_volume" picks block storage for the root disk.
  • dns_credentials is a Cloudflare token or, with dns_provider = "scaleway" on an apex zone, the Scaleway secret key as secret_key.
provider "scaleway" {
access_key = var.scaleway_access_key
secret_key = var.scaleway_secret_key
project_id = var.scaleway_project_id
region = var.region
zone = var.zone
}
module "shc" {
node_groups = {
compose = { count = 1, type = var.instance_type, runtime = "docker" }
workers = { count = 3, type = var.instance_type, runtime = "docker" }
}
assign_flexible_ips = true
root_volume = { size = var.root_volume_gb, type = "sbs_volume" }
}

TF_VAR_scaleway_access_key, TF_VAR_scaleway_secret_key, TF_VAR_scaleway_project_id and TF_VAR_dns_token come from the environment; dns_zone, shc_host and demo_app_host on the command line.

Terminal window
tofu -chdir=learn/shc/terraform/examples/scaleway-shc init
tofu -chdir=learn/shc/terraform/examples/scaleway-shc apply -var dns_zone=example.com -var shc_host=cloud.example.com -var demo_app_host=whoami.example.com
tofu -chdir=learn/shc/terraform/examples/scaleway-shc destroy -var dns_zone=example.com -var shc_host=cloud.example.com -var demo_app_host=whoami.example.com

This page was not walked: labs run on the learning project at Hetzner only. Track F’s Scaleway page covers the same account through the CLI.

Next: Example: vultr-shc.