Skip to content

Terraform module to manage Network Load Balancer resources within the Yandex.Cloud.

License

Notifications You must be signed in to change notification settings

terraform-yacloud-modules/terraform-yandex-nlb

Repository files navigation

Yandex Cloud Network Load Balancer Terraform module

Terraform module which creates Yandex Cloud Network Load Balancer resources.

Examples

Examples codified under the examples are intended to give users references for how to use the module(s) as well as testing/validating changes to the source code of the module. If contributing to the project, please be sure to make any appropriate updates to the relevant examples to allow maintainers to test your changes and to keep the examples up to date for users. Thank you!

Requirements

Name Version
terraform >= 1.3
yandex >= 0.72.0

Providers

Name Version
yandex >= 0.72.0

Modules

No modules.

Resources

Name Type
yandex_lb_network_load_balancer.main resource
yandex_lb_target_group.main resource
yandex_vpc_address.pip resource

Inputs

Name Description Type Default Required
create_pip If true, public IP will be created bool true no
create_target_group If true, target group will be created bool false no
description Network load balancer description string "" no
health_check Target group health check
object({
enabled = optional(bool, false)
name = string
interval = optional(number, 2)
timeout = optional(number, 1)
unhealthy_threshold = optional(number, 2)
healthy_threshold = optional(number, 3)
http_options = optional(object({
port = optional(number)
path = optional(string, "/")
}), null)
tcp_options = optional(object({
port = optional(number)
}), null)
})
{
"name": "app"
}
no
labels A set of labels map(string) {} no
listeners Network load balancer listeners
list(object({
name = optional(string)
port = optional(number)
target_port = optional(number)
protocol = optional(string, "tcp")
is_public = optional(bool, false)
ip_version = optional(string, "ipv4")
}))
[] no
name Network load balancer name string n/a yes
pip Public IP address for the network load balancer string null no
pip_zone_id Public IP zone string "ru-central1-a" no
region_id ID of the availability zone where the network load balancer resides string null no
subnet_id Private subnet where IP for NLB listener will be allocated string null no
target_group_ids IDs of target groups that will be attached to Network Load Balancer list(string) [] no
targets Network load balancer targets
list(object({
address = string
subnet_id = string
}))
[] no
type Network load balancer type; Can be internal or external string "internal" no

Outputs

Name Description
external_ip External IP address of the Network Load Balancer
id Network Load Balancer ID
name Network Load Balancer name
tg_id Target group ID
tg_name Target group name

License

Apache-2.0 Licensed. See LICENSE.