Example: linode-shc
terraform/examples/linode-shc is infra plus bootstrap only, with no
platform resources. It shares a pattern with the Alibaba, CloudStack and
OpenStack roots: the bootstrap block is null until vault_pw is set, so
one root serves both an infra-only apply and a full one.
What differs
Section titled “What differs”modules/shc/linodetakes aregionthat supports VPCs and the metadata service, and aninstance_typeper group.bootstrap = var.vault_pw == "" ? null : { ... }: with the variable empty, the apply stops at the machines, exactly whatmanage_platform = falsedid on page 01.
module "shc" { source = "../../modules/shc/linode"
cluster_name = var.cluster_name region = var.region ssh_public_key = var.ssh_public_key node_groups = { control = { count = 3, instance_type = var.instance_type, runtime = "docker", control_plane = true } } bootstrap = var.vault_pw == "" ? null : { package = { version = var.shc_version } vault_password = var.vault_pw host = var.shc_host }}Running it
Section titled “Running it”LINODE_TOKEN is read by the Linode provider; TF_VAR_ssh_public_key and
TF_VAR_vault_pw come from the environment.
tofu -chdir=learn/shc/terraform/examples/linode-shc inittofu -chdir=learn/shc/terraform/examples/linode-shc applytofu -chdir=learn/shc/terraform/examples/linode-shc destroyThis page was not walked: no Linode credential is on the learning workstation, and the module has not been applied against a live account.
Next: Example: scaleway-shc.
shc@docs:~$