Skip to content

Monitob/terraform-scaleway-lb-module

 
 

Repository files navigation

Scaleway Load Balancer Terraform module

Terraform module that can be used to deploy Load Balancer resources on Scaleway. Common deployment examples can be found in examples/.

Usage

The example below provision a basic Load Balancer.

module "lb" {
  source                          = "scaleway/lb-module/scaleway"
  zone                            = local.zone
  name                            = local.name
  tags                            = local.tags
  create_acls                     = true
  create_routes                   = true
  load_balancer_action_rules      = local.load_balancer_action_rules
  load_balancer_route_host_header = local.load_balancer_route_host_header
}

Requirements

Name Version
terraform >= 0.13
scaleway >= 2.20

Providers

Name Version
scaleway 2.21.0

Modules

No modules.

Resources

Name Type
scaleway_lb.main resource
scaleway_lb_acl.acls resource
scaleway_lb_backend.backend resource
scaleway_lb_frontend.frontend resource
scaleway_lb_ip.main resource
scaleway_lb_route.route resource

Inputs

Name Description Type Default Required
backend_failover_host Scaleway S3 bucket website to be served in case all backend servers are down string null no
backend_forward_port Port to be used on load balancer backend resource as forward port number 80 no
backend_forward_protocol Protocol to be used on load balancer backend resource string "tcp" no
backend_health_check_delay Define maximum health check string "1m0s" no
backend_health_check_max_retries Number of allowed failed HC requests before the backend server is marked down number 2 no
backend_health_check_port The port to use when connecting to a backend server to forward a user session number 80 no
backend_ignore_ssl_server_verify Specifies whether the Load Balancer should check the backend server’s certificate before initiating a connection bool false no
backend_ip_addresses Backend server IP addresses list (IPv4 or IPv6) list(string) [] no
backend_marked_down_action Modify what occurs when a backend server is marked down string "none" no
backend_name The backend name of the load balancer. string null no
backend_port_algorithm Load balancing algorithm string "roundrobin" no
backend_proxy_protocol Type of PROXY protocol to enable string "none" no
backend_ssl_bridging Enables SSL between load balancer and backend servers bool false no
backend_sticky_sessions The type of sticky session string null no
backend_sticky_sessions_cookie_name Cookie name for for sticky sessions string null no
backend_timeout_connect Define maximum timeout for server string "2.5s" no
backend_timeout_health_check Define maximum health check string "30s" no
backend_timeout_server Define maximum timeout for server string "1s" no
backend_timeout_tunnel Define maximum timeout for tunnel string "3s" no
certificate_ids Certificate IDs list list(string) null no
create_acls Controls if the Load Balancer ACl Rules should be created bool true no
create_routes Determines if route should be created bool false no
description Define a description for the Load balancer string null no
frontend_inbound_port Port to be used on load balancer frontend resource as inbound port number 443 no
frontend_name Name to be used on load balancer frontend resource as identifier string "" no
frontend_timeout_client Defines maximum allowed inactivity time on the client side string "30s" no
load_balancer_action_rules A list of maps describing the ACL Rules for this LB. Required key/values: actions, rules. (default to load_balancer_action_rules[count.index]) any [] no
load_balancer_backend_health_check_https An object describing the Health check method for this LB. Required key/values: type: https. Required: uri Optional: code, sni. (default to load_balancer_backend_health_check_https[count.index]
object({
uri = string
code = number
method = string
host_header = string
sni = string
})
null no
load_balancer_name The resource name of the load balancer. string "" no
load_balancer_route_host_header A list of maps describing the load balancer routes. Optional match_sni, match_host_header. Conditions must be based on SNI for direction to TCP backends, or HTTP host headers for direction to HTTP backends. Use the routes endpoint to create, edit, list, get and delete your routes. any [] no
load_balancer_tags Additional tags for the VPC list(string) [] no
load_balancer_type The type of load balancer to create. Possible types: lb-s, lb-gp-m, lb-gp-l, lb-gp-xl string "LB-S" no
name The resource name of the load balancer. string "scaleway-lb-module" no
private_network_configs List of private networks configurations
list(object({
private_network = object({
id = string
dhcp_enabled = bool
static_ips = list(string)
})
}))
[] no
ssl_compatibility_level Determines the minimal SSL version which needs to be supported on client side. string "ssl_compatibility_level_modern" no
tags A list of tags to add to all resources list(string) [] no
timeouts Define maximum timeout for creating, updating, and deleting load balancer resources map(string) {} no
zone Load balancer zone string "fr-par-1" no

Outputs

Name Description
load_balancer_backend_pool List of IP addresses of backend servers attached to this backends
load_balancer_ids Load balancer UUIDs
load_balancer_ip_addresses Load balancer IP addresses
load_balancer_ip_reverse List of reverse of the load balancer IP

Refresh documentation

To create the Readme.md, we use Terraform-docs. The configuration is in the file .terraform-docs.yml. If you want to refresh the Readme.md, from the root of the module execute the following command:

terraform-docs .

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 100.0%