simple-loadbalancer
ka-myl/simple-loadbalancer/upcloud
Basic load balancer setup for UpCloud
Terraform UpCloud Simple Loadbalancer This module creates a simple load balancer setup with all the basic pieces. Example usage: `` resource "upcloud_network" "sdn" { name = "lb-test-sdn" zone = "pl-waw1" ip_network { address = "10.0.20.0/24" dhcp = true family = "IPv4" } } resource "upcloud_server" "servers" { count = 3 hostname = "lb-test-${count.index}" zone = "pl-waw1" plan = "1xCPU-1GB" template { storage = data.upcloud_storage.app_image.id size = 25 } network_interface { type = "utility" } network_interface { type = "public" } network_interface { type = "private" network = upcloud_network.sdn.id } } module "lb" { source = "./basic_loadbalancer" name_prefix = "xyz" zone = "pl-waw1" network_id = upcloud_network.sdn.id servers_ips = [for v in upcloud_server.servers: v.network_interface.
| Name | Type | Description | Default |
|---|---|---|---|
| servers_ips | list(string) | List of servers IP addresses. The traffic will be distributed across the servers | required |
| server_port | number | Port to which the load balancer should direct traffic for specific server | required |
| name_prefix | string | Prefix used to name all of the resources created by this module | required |
| zone | string | Zone in which the load balancer service runs. Must be the same as private networ | required |
| network_id | string | ID of the private network that will be used for load balancing | required |
| frontend_port | number | Port on which the load balancer service will accept requests | 80 |
| plan | string | Load balancer service plan | "development" |
backend_namefrontend_idfrontend_namedns_nameservice_idbackend_id