terraform/modules/terraform-google-lb-internal/variables.tf (123 lines of code) (raw):
/**
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
variable "project" {
description = "The project to deploy to, if not set the default provider project is used."
default = ""
}
variable "region" {
description = "Region for cloud resources."
default = "us-central1"
}
variable "global_access" {
description = "Allow all regions on the same VPC network access."
type = bool
default = false
}
variable "network" {
description = "Name of the network to create resources in."
default = "default"
}
variable "subnetwork" {
description = "Name of the subnetwork to create resources in."
default = "default"
}
variable "network_project" {
description = "Name of the project for the network. Useful for shared VPC. Default is var.project."
default = ""
}
variable "name" {
description = "Name for the forwarding rule and prefix for supporting resources."
}
variable "backends" {
description = "List of backends, should be a map of key-value pairs for each backend, must have the 'group' key."
type = list(object({ group = string, description = string, failover = bool }))
}
variable "session_affinity" {
description = "The session affinity for the backends example: NONE, CLIENT_IP. Default is `NONE`."
default = "NONE"
}
variable "ports" {
description = "List of ports range to forward to backend services. Max is 5."
type = list(string)
}
variable "all_ports" {
description = "Boolean for all_ports setting on forwarding rule."
type = bool
default = null
}
variable "health_check" {
description = "Health check to determine whether instances are responsive and able to do work"
type = object({
type = string
check_interval_sec = number
healthy_threshold = number
timeout_sec = number
unhealthy_threshold = number
response = string
proxy_header = string
port = number
port_name = string
request = string
request_path = string
host = string
})
}
variable "source_tags" {
description = "List of source tags for traffic between the internal load balancer."
type = list(string)
}
variable "target_tags" {
description = "List of target tags for traffic between the internal load balancer."
type = list(string)
}
variable "source_ip_ranges" {
description = "List of source ip ranges for traffic between the internal load balancer."
type = list(string)
default = null
}
variable "source_service_accounts" {
description = "List of source service accounts for traffic between the internal load balancer."
type = list(string)
default = null
}
variable "target_service_accounts" {
description = "List of target service accounts for traffic between the internal load balancer."
type = list(string)
default = null
}
variable "ip_address" {
description = "IP address of the internal load balancer, if empty one will be assigned. Default is empty."
default = null
}
variable "ip_protocol" {
description = "The IP protocol for the backend and frontend forwarding rule. TCP or UDP."
default = "TCP"
}
variable "service_label" {
description = "Service label is used to create internal DNS name"
default = null
type = string
}
variable "ilb_required" {
type = bool
description = "flag to create resources"
default = true
}
variable "failover_policy" {
type = map(string)
description = "Failover policy for the backend service"
default = null
}