/terraform-hetzner-loadbalancer-module

terraform module which creates load balancer resource on hetzner

Primary LanguageHCLApache License 2.0Apache-2.0

Requirements

Name Version
terraform >= 1.4.0
hcloud >= 1.42.0

Providers

Name Version
hcloud 1.42.1

Modules

No modules.

Resources

Name Type
hcloud_load_balancer.lb resource
hcloud_load_balancer_network.lb_network resource
hcloud_load_balancer_service.lb_service resource
hcloud_load_balancer_target.lb_target resource

Inputs

Name Description Type Default Required
algorithm Configuration of the algorithm the Load Balancer use. string "round_robin" no
delete_protection Enable or disable delete protection. bool false no
enable_public_interface Enable or disable the Load Balancers public interface. bool true no
ip IP address of this LB. string n/a yes
label_selector Label Selector selecting targets for this Load Balancer. string n/a yes
labels User-defined labels (key-value pairs) should be created with. map(string) {} no
load_balancer_type Type of the Load Balancer. string "lb11" no
location The location name of the Load Balancer. Require when no network_zone is set. string n/a yes
name Name of the Load Balancer. string n/a yes
service_configs List service port and healthcheck config.
list(object({
protocol = string
listen_port = number
destination_port = number
proxyprotocol = optional(bool, false)
http_configs = optional(list(object({
sticky_sessions = optional(bool, false)
cookie_name = optional(string)
cookie_lifetime = optional(number)
certificates = optional(list(string))
redirect_http = optional(bool)
})), [])
health_check_configs = optional(list(object({
protocol = string
port = number
interval = number
timeout = number
retries = optional(number, 10)

http_configs = optional(list(object({
domain = optional(string)
path = string
response = optional(string)
tls = optional(bool, true)
status_codes = optional(list(string), ["200"])
})), [])
})), [])
}))
[] no
subnet_id ID of the sub-network which should be added to the Load Balancer. string n/a yes

Outputs

Name Description
id ID of this loadbalancer
ipv4 IPV4 of this loadbalancer
labels Resource labels
location Location of this loadbalancer
name Name of this loadbalancer