Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

terraform-google-modules/terraform-google-lb-internal

Modular Internal Load Balancer for GCE using forwarding rules.

Load Balancer Types

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:

Usage

module"gce-ilb" {source="GoogleCloudPlatform/lb-internal/google"version="~> 6.0"region=var.regionname="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    unhealthy_threshold=5    response=""    proxy_header="NONE"    port=80    port_name="health-check-port"    request=""    request_path="/"    host="1.2.3.4"    enable_log=false  }backends=[    {      group= module.mig2.instance_group      description=""      failover=false    },    {      group= module.mig3.instance_group      description=""      failover=false    },  ]}

Inputs

NameDescriptionTypeDefaultRequired
all_portsBoolean for all_ports setting on forwarding rule. Theports orall_ports are mutually exclusive.boolnullno
backendsList of backends, should be a map of key-value pairs for each backend, must have the 'group' key.list(any)n/ayes
connection_draining_timeout_secTime for which instance will be drainednumbernullno
create_backend_firewallControls if firewall rules for the backends will be created or not. Health-check firewall rules are controlled separately.booltrueno
create_health_check_firewallControls if firewall rules for the health check will be created or not. If this rule is not present backend healthcheck will fail.booltrueno
firewall_enable_loggingControls if firewall rules that are created are to have logging configured. This will be ignored for firewall rules that are not created.boolfalseno
global_accessAllow all regions on the same VPC network access.boolfalseno
health_checkHealth check to determine whether instances are responsive and able to do work
object({
type = string
check_interval_sec = optional(number)
healthy_threshold = optional(number)
timeout_sec = optional(number)
unhealthy_threshold = optional(number)
response = optional(string)
proxy_header = optional(string)
port = optional(number)
port_name = optional(string)
request = optional(string)
request_path = optional(string)
host = optional(string)
enable_log = optional(bool)
})
n/ayes
ip_addressIP address of the internal load balancer, if empty one will be assigned. Default is empty.stringnullno
ip_protocolThe IP protocol for the backend and frontend forwarding rule. TCP or UDP.string"TCP"no
is_mirroring_collectorIndicates whether or not this load balancer can be used as a collector for packet mirroring. This can only be set to true for load balancers that have their loadBalancingScheme set to INTERNAL.boolfalseno
labelsThe labels to attach to resources created by this module.map(string){}no
nameName for the forwarding rule and prefix for supporting resources.stringn/ayes
networkName of the network to create resources in.string"default"no
network_projectName of the project for the network. Useful for shared VPC. Default is var.project.string""no
portsList of ports to forward to backend services. Max is 5. Theports orall_ports are mutually exclusive.list(string)nullno
projectThe project to deploy to, if not set the default provider project is used.string""no
regionRegion for cloud resources.string"us-central1"no
service_labelService label is used to create internal DNS namestringnullno
session_affinityThe session affinity for the backends example: NONE, CLIENT_IP. Default isNONE.string"NONE"no
source_ip_rangesList of source ip ranges for traffic between the internal load balancer.list(string)nullno
source_service_accountsList of source service accounts for traffic between the internal load balancer.list(string)nullno
source_tagsList of source tags for traffic between the internal load balancer.list(string)n/ayes
subnetworkName of the subnetwork to create resources in.string"default"no
target_service_accountsList of target service accounts for traffic between the internal load balancer.list(string)nullno
target_tagsList of target tags for traffic between the internal load balancer.list(string)n/ayes

Outputs

NameDescription
forwarding_ruleThe forwarding rule self_link.
forwarding_rule_idThe forwarding rule id.
ip_addressThe internal IP assigned to the regional forwarding rule.

Resources created

About

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

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors34


[8]ページ先頭

©2009-2025 Movatter.jp