Terraform module to create and manage Scaleway Load Balancers.
This module creates and configures the following resources:
- Scaleway Load Balancers
- Scaleway Load Balancer IPs
- Scaleway Load Balancer Certificates
- Scaleway Load Balancer Frontends
- Scaleway Load Balancer Backends
It allows to define multiple Load Balancers using a map
of Load Balancer
definitions.
Every output is available at the Load Balancer definition scope in the
output.this
Terraform Output.
This module supports Managed Load Balancer IPs (created using this module)
as well as Non-Managed Load Balancer IPs by setting the create_ip
Load Balancer
attribute to false
and by passing the corresponding information in the ip
attribute that matches the ones in the Scaleway Load Balancer IP Datasource
module "loadbalancers" {
source = "particuleio/loadbalancer/scaleway"
loadbalancers = {
# define each Load Balancer in the `loadbalancers` map.
default = {
type = "LB-S"
name = "default-lb"
backends = [
{
name = "sample-test"
forward_port = 80
forward_protocol = "http"
}
]
frontends = [
{
name = "sample-frontend"
inbound_port = 80
backend_name = "sample-test" # match the backend name
}
]
}
}
}
Examples are available in the ./examples/
directory.
Name | Version |
---|---|
terraform | >= 0.13 |
scaleway | ~> 2.0 |
Name | Version |
---|---|
scaleway | ~> 2.0 |
No modules.
Name | Type |
---|---|
scaleway_lb.this | resource |
scaleway_lb_backend.this | resource |
scaleway_lb_certificate.this | resource |
scaleway_lb_frontend.this | resource |
scaleway_lb_ip.this | resource |
scaleway_lb_ip.this | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
loadbalancers | The Scaleway Load Balancers configurations | map(any) |
n/a | yes |
region | Region to be used with the Scaleway provider | string |
"fr-par" |
no |
zone | Zone to be used with the Scaleway provider | string |
"fr-par-1" |
no |
Name | Description |
---|---|
loadbalancer_backends | The Scaleway Load Balancer Backends |
loadbalancer_frontends | The Scaleway Load Balancer Frontends |
loadbalancers | The Scaleway Load Balancer resources |
this | Map of every Load Balancer configuration: LBs, LB IPs, Backends, Frontends, Certificates |