lb-internal

GoogleCloudPlatform/lb-internal/google

Terraform Module HCL GOOGLE ✓ Verified

Creates an internal load balancer for Compute Engine by using forwarding rules

Install
module "lb-internal" {
source = "GoogleCloudPlatform/lb-internal/google"
version = "9.0.0"
}
plain text: /constructs/tfmod-googlecloudplatform-lb-internal-google/install.txt
⭐ Source on GitHub 📦 Registry page
README

Internal Load Balancer Terraform Module Modular Internal Load Balancer for GCE using forwarding rules. Load Balancer Types TCP load balancer HTTP/S load balancer Internal load balancer** Compatibility This module is meant for use with Terraform 1.3+ and tested using Terraform 1.3+. If you find incompatibilities using Terraform >=1.3, please open an issue. Upgrading The following guides are available to assist with upgrades: - 1.X -> 2.0 - 5.x -> 6.x - 7.x -> 8.x Usage ``hcl module "gce-ilb" { source = "GoogleCloudPlatform/lb-internal/google" version = "~> 6.0" region = var.region name = "group2-ilb" ports = ["80"] source_tags = ["allow-group1"] target_tags = ["allow-group2", "allow-group3"] health_check = { type = "http" check_interval_sec = 1 healthy_threshold = 4 timeout_sec = 1 unhealth

Inputs (27)
NameTypeDescriptionDefault
project_idstringThe project_id to deploy to. required
health_checkobject({ type Health check to determine whether instances are responsive and able to do work required
namestringName for the forwarding rule and prefix for supporting resources. required
regionstringRegion for cloud resources. required
backendslist(object({ group List of backends, should be a map of key-value pairs for each backend, must have required
ip_addressstringIP address of the internal load balancer, if empty one will be assigned. Defaultnull
global_accessboolAllow all regions on the same VPC network access.false
target_tagslist(string)List of target tags for traffic between the internal load balancer.[]
source_service_accountslist(string)List of source service accounts for traffic between the internal load balancer.null
ip_protocolstringThe IP protocol for the backend and frontend forwarding rule. TCP or UDP."TCP"
service_labelstringService label is used to create internal DNS namenull
connection_draining_timeout_secnumberTime for which instance will be drainednull
portslist(string)List of ports to forward to backend services. Max is 5. The `ports` or `all_port[ "80" ]
all_portsboolBoolean for all_ports setting on forwarding rule. The `ports` or `all_ports` arefalse
create_backend_firewallboolControls if firewall rules for the backends will be created or not. Health-checktrue
labelsmap(string)The labels to attach to resources created by this module.{}
is_mirroring_collectorboolIndicates whether or not this load balancer can be used as a collector for packefalse
subnetworkstringName of the subnetwork to create resources in."default"
network_projectstringName of the project for the network. Useful for shared VPC. Default is var.proje""
source_ip_rangeslist(string)List of source ip ranges for traffic between the internal load balancer.[]
create_health_check_firewallboolControls if firewall rules for the health check will be created or not. If this true
firewall_enable_loggingboolControls if firewall rules that are created are to have logging configured. Thisfalse
networkstringName of the network to create resources in."default"
subnetslist(object({ id = stOptional: A map containing subnet details Used to derive the subnetwork URI if s[]
session_affinitystringThe session affinity for the backends example: NONE, CLIENT_IP. Default is `NONE"NONE"
Outputs (3)
ip_address — The internal IP assigned to the regional forwarding rule.
forwarding_rule — The forwarding rule self_link.
forwarding_rule_id — The forwarding rule id.
Resources (4)
google_compute_firewallgoogle_compute_forwarding_rulegoogle_compute_health_checkgoogle_compute_region_backend_service
Details
FrameworkTerraform Module
LanguageHCL
Version9.0.0
Cloud GOOGLE
★ Stars92
Forks93
Total downloads5.1M
Inputs27
Outputs3
Resources4
Examples2
LicenseApache-2.0
NamespaceGoogleCloudPlatform
Updated