Skip to content

Commit d8e56ec

Browse files
authored
Merge branch 'master' into feat/variabilize-resource-names
2 parents 8825497 + 3463500 commit d8e56ec

File tree

25 files changed

+140
-63
lines changed

25 files changed

+140
-63
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,34 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [11.1.0](https://github.com/terraform-google-modules/terraform-google-lb-http/compare/v11.0.0...v11.1.0) (2024-05-29)
9+
10+
11+
### Features
12+
13+
* Add support for setting http_keep_alive_timeout_sec ([#425](https://github.com/terraform-google-modules/terraform-google-lb-http/issues/425)) ([804b7b9](https://github.com/terraform-google-modules/terraform-google-lb-http/commit/804b7b9f9cedf234a2973e13c5ab78c8fec6ee12))
14+
15+
16+
### Bug Fixes
17+
18+
* add backend.groups.description variable to serverless_neg ([#427](https://github.com/terraform-google-modules/terraform-google-lb-http/issues/427)) ([3d7943c](https://github.com/terraform-google-modules/terraform-google-lb-http/commit/3d7943ca8f7c5a38b3b7bf57c5de034a9f7eed49))
19+
20+
## [11.0.0](https://github.com/terraform-google-modules/terraform-google-lb-http/compare/v10.2.0...v11.0.0) (2024-05-03)
21+
22+
23+
### ⚠ BREAKING CHANGES
24+
25+
* **TPG>=4.84:** make health_check optional in root module for serverless neg ([#414](https://github.com/terraform-google-modules/terraform-google-lb-http/issues/414))
26+
27+
### Features
28+
29+
* **TPG>=4.84:** make health_check optional in root module for serverless neg ([#414](https://github.com/terraform-google-modules/terraform-google-lb-http/issues/414)) ([fe92b95](https://github.com/terraform-google-modules/terraform-google-lb-http/commit/fe92b95024414d019a4f0125c1bea307be60bc24))
30+
31+
32+
### Bug Fixes
33+
34+
* updates for tflint ([#403](https://github.com/terraform-google-modules/terraform-google-lb-http/issues/403)) ([29e4503](https://github.com/terraform-google-modules/terraform-google-lb-http/commit/29e4503a62a7df8656353d271756da62236b3529))
35+
836
## [10.2.0](https://github.com/terraform-google-modules/terraform-google-lb-http/compare/v10.1.0...v10.2.0) (2024-03-20)
937

1038

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Make will use bash instead of sh
1919
SHELL := /usr/bin/env bash
2020

21-
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.19
21+
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.20
2222
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
2323
REGISTRY_URL := gcr.io/cloud-foundation-cicd
2424

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ module "gce-lb-http" {
9494
| Name | Description | Type | Default | Required |
9595
|------|-------------|------|---------|:--------:|
9696
| address | Existing IPv4 address to use (the actual IP address value) | `string` | `null` | no |
97-
| backends | Map backend indices to list of backend maps. | <pre>map(object({<br> port = optional(number)<br> project = optional(string)<br> protocol = optional(string)<br> port_name = optional(string)<br> description = optional(string)<br> enable_cdn = optional(bool)<br> compression_mode = optional(string)<br> security_policy = optional(string, null)<br> edge_security_policy = optional(string, null)<br> custom_request_headers = optional(list(string))<br> custom_response_headers = optional(list(string))<br><br> timeout_sec = optional(number)<br> connection_draining_timeout_sec = optional(number)<br> session_affinity = optional(string)<br> affinity_cookie_ttl_sec = optional(number)<br> locality_lb_policy = optional(string)<br><br> health_check = optional(object({<br> host = optional(string)<br> request_path = optional(string)<br> request = optional(string)<br> response = optional(string)<br> port = optional(number)<br> port_name = optional(string)<br> proxy_header = optional(string)<br> port_specification = optional(string)<br> protocol = optional(string)<br> check_interval_sec = optional(number)<br> timeout_sec = optional(number)<br> healthy_threshold = optional(number)<br> unhealthy_threshold = optional(number)<br> logging = optional(bool)<br> }))<br><br> log_config = object({<br> enable = optional(bool)<br> sample_rate = optional(number)<br> })<br><br> groups = list(object({<br> group = string<br><br> balancing_mode = optional(string)<br> capacity_scaler = optional(number)<br> description = optional(string)<br> max_connections = optional(number)<br> max_connections_per_instance = optional(number)<br> max_connections_per_endpoint = optional(number)<br> max_rate = optional(number)<br> max_rate_per_instance = optional(number)<br> max_rate_per_endpoint = optional(number)<br> max_utilization = optional(number)<br> }))<br> iap_config = object({<br> enable = bool<br> oauth2_client_id = optional(string)<br> oauth2_client_secret = optional(string)<br> })<br> cdn_policy = optional(object({<br> cache_mode = optional(string)<br> signed_url_cache_max_age_sec = optional(string)<br> default_ttl = optional(number)<br> max_ttl = optional(number)<br> client_ttl = optional(number)<br> negative_caching = optional(bool)<br> negative_caching_policy = optional(object({<br> code = optional(number)<br> ttl = optional(number)<br> }))<br> serve_while_stale = optional(number)<br> cache_key_policy = optional(object({<br> include_host = optional(bool)<br> include_protocol = optional(bool)<br> include_query_string = optional(bool)<br> query_string_blacklist = optional(list(string))<br> query_string_whitelist = optional(list(string))<br> include_http_headers = optional(list(string))<br> include_named_cookies = optional(list(string))<br> }))<br> bypass_cache_on_request_headers = optional(list(string))<br> }))<br> outlier_detection = optional(object({<br> base_ejection_time = optional(object({<br> seconds = number<br> nanos = optional(number)<br> }))<br> consecutive_errors = optional(number)<br> consecutive_gateway_failure = optional(number)<br> enforcing_consecutive_errors = optional(number)<br> enforcing_consecutive_gateway_failure = optional(number)<br> enforcing_success_rate = optional(number)<br> interval = optional(object({<br> seconds = number<br> nanos = optional(number)<br> }))<br> max_ejection_percent = optional(number)<br> success_rate_minimum_hosts = optional(number)<br> success_rate_request_volume = optional(number)<br> success_rate_stdev_factor = optional(number)<br> }))<br> }))</pre> | n/a | yes |
97+
| backends | Map backend indices to list of backend maps. | <pre>map(object({<br> port = optional(number)<br> project = optional(string)<br> protocol = optional(string)<br> port_name = optional(string)<br> description = optional(string)<br> enable_cdn = optional(bool)<br> compression_mode = optional(string)<br> security_policy = optional(string, null)<br> edge_security_policy = optional(string, null)<br> custom_request_headers = optional(list(string))<br> custom_response_headers = optional(list(string))<br><br> timeout_sec = optional(number)<br> connection_draining_timeout_sec = optional(number)<br> session_affinity = optional(string)<br> affinity_cookie_ttl_sec = optional(number)<br> locality_lb_policy = optional(string)<br><br> health_check = optional(object({<br> host = optional(string)<br> request_path = optional(string)<br> request = optional(string)<br> response = optional(string)<br> port = optional(number)<br> port_name = optional(string)<br> proxy_header = optional(string)<br> port_specification = optional(string)<br> protocol = optional(string)<br> check_interval_sec = optional(number)<br> timeout_sec = optional(number)<br> healthy_threshold = optional(number)<br> unhealthy_threshold = optional(number)<br> logging = optional(bool)<br> }))<br><br> log_config = object({<br> enable = optional(bool)<br> sample_rate = optional(number)<br> })<br><br> groups = list(object({<br> group = string<br> description = optional(string)<br><br> balancing_mode = optional(string)<br> capacity_scaler = optional(number)<br> max_connections = optional(number)<br> max_connections_per_instance = optional(number)<br> max_connections_per_endpoint = optional(number)<br> max_rate = optional(number)<br> max_rate_per_instance = optional(number)<br> max_rate_per_endpoint = optional(number)<br> max_utilization = optional(number)<br> }))<br> iap_config = object({<br> enable = bool<br> oauth2_client_id = optional(string)<br> oauth2_client_secret = optional(string)<br> })<br> cdn_policy = optional(object({<br> cache_mode = optional(string)<br> signed_url_cache_max_age_sec = optional(string)<br> default_ttl = optional(number)<br> max_ttl = optional(number)<br> client_ttl = optional(number)<br> negative_caching = optional(bool)<br> negative_caching_policy = optional(object({<br> code = optional(number)<br> ttl = optional(number)<br> }))<br> serve_while_stale = optional(number)<br> cache_key_policy = optional(object({<br> include_host = optional(bool)<br> include_protocol = optional(bool)<br> include_query_string = optional(bool)<br> query_string_blacklist = optional(list(string))<br> query_string_whitelist = optional(list(string))<br> include_http_headers = optional(list(string))<br> include_named_cookies = optional(list(string))<br> }))<br> bypass_cache_on_request_headers = optional(list(string))<br> }))<br> outlier_detection = optional(object({<br> base_ejection_time = optional(object({<br> seconds = number<br> nanos = optional(number)<br> }))<br> consecutive_errors = optional(number)<br> consecutive_gateway_failure = optional(number)<br> enforcing_consecutive_errors = optional(number)<br> enforcing_consecutive_gateway_failure = optional(number)<br> enforcing_success_rate = optional(number)<br> interval = optional(object({<br> seconds = number<br> nanos = optional(number)<br> }))<br> max_ejection_percent = optional(number)<br> success_rate_minimum_hosts = optional(number)<br> success_rate_request_volume = optional(number)<br> success_rate_stdev_factor = optional(number)<br> }))<br> }))</pre> | n/a | yes |
9898
| certificate | Content of the SSL certificate. Requires `ssl` to be set to `true` and `create_ssl_certificate` set to `true` | `string` | `null` | no |
9999
| certificate\_map | Certificate Map ID in format projects/{project}/locations/global/certificateMaps/{name}. Identifies a certificate map associated with the given target proxy. Requires `ssl` to be set to `true` | `string` | `null` | no |
100100
| create\_address | Create a new global IPv4 address | `bool` | `true` | no |
@@ -106,6 +106,7 @@ module "gce-lb-http" {
106106
| firewall\_networks | Names of the networks to create firewall rules in | `list(string)` | <pre>[<br> "default"<br>]</pre> | no |
107107
| firewall\_projects | Names of the projects to create firewall rules in | `list(string)` | <pre>[<br> "default"<br>]</pre> | no |
108108
| http\_forward | Set to `false` to disable HTTP port 80 forward | `bool` | `true` | no |
109+
| http\_keep\_alive\_timeout\_sec | Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds). | `number` | `null` | no |
109110
| http\_port | The port for the HTTP load balancer | `number` | `80` | no |
110111
| https\_port | The port for the HTTPS load balancer | `number` | `443` | no |
111112
| https\_redirect | Set to `true` to enable https redirect on the lb. | `bool` | `false` | no |

autogen/main.tf.tmpl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,12 @@ resource "google_compute_target_https_proxy" "default" {
119119
name = "${var.name_prefixes.target_https_proxy != null ? var.name_prefixes.target_https_proxy : var.name}${var.name_suffixes.target_https_proxy}"
120120
url_map = local.url_map
121121

122-
ssl_certificates = compact(concat(var.ssl_certificates, google_compute_ssl_certificate.default[*].self_link, google_compute_managed_ssl_certificate.default[*].self_link, ), )
123-
certificate_map = var.certificate_map != null ? "//certificatemanager.googleapis.com/${var.certificate_map}" : null
124-
ssl_policy = var.ssl_policy
125-
quic_override = var.quic == null ? "NONE" : var.quic ? "ENABLE" : "DISABLE"
126-
server_tls_policy = var.server_tls_policy
122+
ssl_certificates = compact(concat(var.ssl_certificates, google_compute_ssl_certificate.default[*].self_link, google_compute_managed_ssl_certificate.default[*].self_link, ), )
123+
certificate_map = var.certificate_map != null ? "//certificatemanager.googleapis.com/${var.certificate_map}" : null
124+
ssl_policy = var.ssl_policy
125+
quic_override = var.quic == null ? "NONE" : var.quic ? "ENABLE" : "DISABLE"
126+
server_tls_policy = var.server_tls_policy
127+
http_keep_alive_timeout_sec = var.http_keep_alive_timeout_sec
127128
}
128129

129130
resource "google_compute_ssl_certificate" "default" {

autogen/variables.tf.tmpl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ variable "backends" {
134134

135135
groups = list(object({
136136
group = string
137+
description = optional(string)
137138

138139
{% if not serverless %}
139140
balancing_mode = optional(string)
140141
capacity_scaler = optional(number)
141-
description = optional(string)
142142
max_connections = optional(number)
143143
max_connections_per_instance = optional(number)
144144
max_connections_per_endpoint = optional(number)
@@ -377,3 +377,9 @@ variable "name_prefixes" {
377377
})
378378
default = {}
379379
}
380+
381+
variable "http_keep_alive_timeout_sec" {
382+
description = "Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds)."
383+
type = number
384+
default = null
385+
}

autogen/versions.tf.tmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@ terraform {
3434

3535
provider_meta "google" {
3636
{% if serverless %}
37-
module_name = "blueprints/terraform/terraform-google-lb-http:serverless_negs/v10.2.0"
37+
module_name = "blueprints/terraform/terraform-google-lb-http:serverless_negs/v11.1.0"
3838
{% elif dynamic_backends %}
39-
module_name = "blueprints/terraform/terraform-google-lb-http:dynamic_backends/v10.2.0"
39+
module_name = "blueprints/terraform/terraform-google-lb-http:dynamic_backends/v11.1.0"
4040
{% else %}
41-
module_name = "blueprints/terraform/terraform-google-lb-http/v10.2.0"
41+
module_name = "blueprints/terraform/terraform-google-lb-http/v11.1.0"
4242
{% endif %}
4343
}
4444

4545
provider_meta "google-beta" {
4646
{% if serverless %}
47-
module_name = "blueprints/terraform/terraform-google-lb-http:serverless_negs/v10.2.0"
47+
module_name = "blueprints/terraform/terraform-google-lb-http:serverless_negs/v11.1.0"
4848
{% elif dynamic_backends %}
49-
module_name = "blueprints/terraform/terraform-google-lb-http:dynamic_backends/v10.2.0"
49+
module_name = "blueprints/terraform/terraform-google-lb-http:dynamic_backends/v11.1.0"
5050
{% else %}
51-
module_name = "blueprints/terraform/terraform-google-lb-http/v10.2.0"
51+
module_name = "blueprints/terraform/terraform-google-lb-http/v11.1.0"
5252
{% endif %}
5353
}
5454

build/int.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ tags:
9393
- 'integration'
9494
substitutions:
9595
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
96-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.19'
96+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.20'

build/lint.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ tags:
2121
- 'lint'
2222
substitutions:
2323
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
24-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.19'
24+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.20'

examples/dynamic-backend/main.tf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ module "load_balancer" {
3434
source = "terraform-google-modules/lb-http/google//modules/dynamic_backends"
3535
version = "~> 10.0"
3636

37-
name = "dynamic-backend-lb"
38-
project = var.project
39-
enable_ipv6 = true
40-
create_ipv6_address = true
41-
http_forward = false
37+
name = "dynamic-backend-lb"
38+
project = var.project
39+
enable_ipv6 = true
40+
create_ipv6_address = true
41+
http_forward = false
42+
http_keep_alive_timeout_sec = 610
4243

4344
load_balancing_scheme = "EXTERNAL_MANAGED"
4445

main.tf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,12 @@ resource "google_compute_target_https_proxy" "default" {
117117
name = "${var.name_prefixes.target_https_proxy != null ? var.name_prefixes.target_https_proxy : var.name}${var.name_suffixes.target_https_proxy}"
118118
url_map = local.url_map
119119

120-
ssl_certificates = compact(concat(var.ssl_certificates, google_compute_ssl_certificate.default[*].self_link, google_compute_managed_ssl_certificate.default[*].self_link, ), )
121-
certificate_map = var.certificate_map != null ? "//certificatemanager.googleapis.com/${var.certificate_map}" : null
122-
ssl_policy = var.ssl_policy
123-
quic_override = var.quic == null ? "NONE" : var.quic ? "ENABLE" : "DISABLE"
124-
server_tls_policy = var.server_tls_policy
120+
ssl_certificates = compact(concat(var.ssl_certificates, google_compute_ssl_certificate.default[*].self_link, google_compute_managed_ssl_certificate.default[*].self_link, ), )
121+
certificate_map = var.certificate_map != null ? "//certificatemanager.googleapis.com/${var.certificate_map}" : null
122+
ssl_policy = var.ssl_policy
123+
quic_override = var.quic == null ? "NONE" : var.quic ? "ENABLE" : "DISABLE"
124+
server_tls_policy = var.server_tls_policy
125+
http_keep_alive_timeout_sec = var.http_keep_alive_timeout_sec
125126
}
126127

127128
resource "google_compute_ssl_certificate" "default" {

0 commit comments

Comments
 (0)