Skip to content

Latest commit

 

History

History

vultr

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Vultr Terraform Example

This example will create a load-balanced, HA Talos cluster on vultr.com. It will use the marketplace image of Talos that is present in Vultr and should result in a stable, maintainable cluster.

Prereqs

Export the VULTR_API_KEY environment variable with your API key obtained from vultr.com. From this directory, issue terraform init to ensure the proper providers are pulled down.

Usage

To create a default cluster, this should be as simple as terraform apply. This will create a cluster called talos-vultr with 3 control plane nodes and a single worker in the Atlanta region. Each of these VMs will be 2 CPU / 4GB RAM VMs. If different specs or regions are required, override them through command line with the -var flag or by creating a varsfile and overriding with -var-file. Destroying the cluster should, again, be a simple terraform destroy.

Getting the kubeconfig and talosconfig for this cluster can be done with terraform output -raw kubeconfig > <desired-path-and-filename> and terraform output -raw talosconfig > <desired-path-and-filename>

Requirements

Name Version
talos 0.7.0-alpha.0
vultr 2.12.0

Providers

Name Version
talos 0.7.0-alpha.0
vultr 2.12.0

Modules

No modules.

Resources

Name Type
talos_cluster_kubeconfig.this resource
talos_machine_bootstrap.this resource
talos_machine_configuration_apply.controlplane resource
talos_machine_configuration_apply.worker resource
talos_machine_secrets.this resource
vultr_instance.talos_control_plane resource
vultr_instance.talos_workers resource
vultr_load_balancer.talos_lb resource
talos_client_configuration.this data source
talos_machine_configuration.controlplane data source
talos_machine_configuration.worker data source

Inputs

Name Description Type Default Required
cluster_name Name of cluster string "talos-vultr" no
num_control_plane Number of control plane nodes to create number 3 no
num_workers Number of worker nodes to create number 1 no
vultr_plan Vultr plan to use string "vc2-2c-4gb" no
vultr_region Vultr region to use string "atl" no

Outputs

Name Description
kubeconfig n/a
talosconfig n/a