Skip to content

Commit 00b5d2f

Browse files
authored
fix!: Fix result of var.quic to match the current behaviour on GCP (terraform-google-modules#318)
1 parent f769bf7 commit 00b5d2f

15 files changed

+24
-23
lines changed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ Current version is 3.0. Upgrade guides:
129129
| https\_redirect | Set to `true` to enable https redirect on the lb. | `bool` | `false` | no |
130130
| ipv6\_address | An existing IPv6 address to use (the actual IP address value) | `string` | `null` | no |
131131
| labels | The labels to attach to resources created by this module | `map(string)` | `{}` | no |
132-
| load\_balancing\_scheme | Load balancing scheme type (EXTERNAL for classic external load balancer, EXTERNAL\_MANAGED for Envoy-based load balancer, INTERNAL for classic internal load balancer, and INTERNAL\_SELF\_MANAGED for Traffic Director) | `string` | `"EXTERNAL"` | no |
132+
| load\_balancing\_scheme | Load balancing scheme type (EXTERNAL for classic external load balancer, EXTERNAL\_MANAGED for Envoy-based load balancer, INTERNAL for classic internal load balancer, and INTERNAL\_SELF\_MANAGED for internal load balancer) | `string` | `"EXTERNAL"` | no |
133133
| managed\_ssl\_certificate\_domains | Create Google-managed SSL certificates for specified domains. Requires `ssl` to be set to `true` and `use_ssl_certificates` set to `false`. | `list(string)` | `[]` | no |
134134
| name | Name for the forwarding rule and prefix for supporting resources | `string` | n/a | yes |
135135
| private\_key | Content of the private SSL key. Required if `ssl` is `true` and `ssl_certificates` is empty. | `string` | `null` | no |
136136
| project | The project to deploy to, if not set the default provider project is used. | `string` | n/a | yes |
137-
| quic | Set to `true` to enable QUIC support | `bool` | `false` | no |
137+
| quic | Specifies the QUIC override policy for this resource. Set true to enable HTTP/3 and Google QUIC support, false to disable both. Defaults to null which enables support for HTTP/3 only. | `bool` | `null` | no |
138138
| random\_certificate\_suffix | Bool to enable/disable random certificate name generation. Set and keep this to true if you need to change the SSL cert. | `bool` | `false` | no |
139139
| security\_policy | The resource URL for the security policy to associate with the backend service | `string` | `null` | no |
140140
| ssl | Set to `true` to enable SSL support, requires variable `ssl_certificates` - a list of self\_link certs | `bool` | `false` | no |

Diff for: autogen/main.tf.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ resource "google_compute_target_https_proxy" "default" {
116116
ssl_certificates = compact(concat(var.ssl_certificates, google_compute_ssl_certificate.default.*.self_link, google_compute_managed_ssl_certificate.default.*.self_link, ), )
117117
certificate_map = var.certificate_map != null ? "//certificatemanager.googleapis.com/${var.certificate_map}" : null
118118
ssl_policy = var.ssl_policy
119-
quic_override = var.quic ? "ENABLE" : null
119+
quic_override = var.quic == null ? "NONE" : var.quic ? "ENABLE" : "DISABLE"
120120
}
121121

122122
resource "google_compute_ssl_certificate" "default" {

Diff for: autogen/variables.tf.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ variable "ssl_policy" {
202202

203203
variable "quic" {
204204
type = bool
205-
description = "Set to `true` to enable QUIC support"
206-
default = false
205+
description = "Specifies the QUIC override policy for this resource. Set true to enable HTTP/3 and Google QUIC support, false to disable both. Defaults to null which enables support for HTTP/3 only."
206+
default = null
207207
}
208208

209209
variable "private_key" {

Diff for: docs/upgrading_to_v9.0.md

+4
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ The v9.0 release contains backwards-incompatible changes.
55
This update requires upgrading the minimum provider version from `4.45` to `4.50`.
66

77
The [`edge_security_policy`](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/cb15ed7391f1bbcc4fdb6d55ee5703ca0d47447a/variables.tf#L91) object attribute and its nested attributes within the [`backends`] variable (https://github.com/terraform-google-modules/terraform-google-lb-http/blob/cb15ed7391f1bbcc4fdb6d55ee5703ca0d47447a/variables.tf#L81) is now available. It is optional.
8+
9+
---
10+
11+
The [`quic`](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/dfb6cdaf5681e59324294bb23f0e656e0f4847e6/variables.tf#L190) variable now takes `true`, `false`, or `null` which corresponds to HTTP/3 and Google QUIC being enabled, both disabled, and HTTP/3 enabled only. Defaults to `null`.

Diff for: main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ resource "google_compute_target_https_proxy" "default" {
114114
ssl_certificates = compact(concat(var.ssl_certificates, google_compute_ssl_certificate.default.*.self_link, google_compute_managed_ssl_certificate.default.*.self_link, ), )
115115
certificate_map = var.certificate_map != null ? "//certificatemanager.googleapis.com/${var.certificate_map}" : null
116116
ssl_policy = var.ssl_policy
117-
quic_override = var.quic ? "ENABLE" : null
117+
quic_override = var.quic == null ? "NONE" : var.quic ? "ENABLE" : "DISABLE"
118118
}
119119

120120
resource "google_compute_ssl_certificate" "default" {

Diff for: metadata.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,8 @@ spec:
197197
type: string
198198
required: true
199199
- name: quic
200-
description: Set to `true` to enable QUIC support
200+
description: Specifies the QUIC override policy for this resource. Set true to enable HTTP/3 and Google QUIC support, false to disable both. Defaults to null which enables support for HTTP/3 only.
201201
type: bool
202-
default: false
203202
required: false
204203
- name: random_certificate_suffix
205204
description: Bool to enable/disable random certificate name generation. Set and keep this to true if you need to change the SSL cert.

Diff for: modules/dynamic_backends/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Current version is 3.0. Upgrade guides:
127127
| name | Name for the forwarding rule and prefix for supporting resources | `string` | n/a | yes |
128128
| private\_key | Content of the private SSL key. Required if `ssl` is `true` and `ssl_certificates` is empty. | `string` | `null` | no |
129129
| project | The project to deploy to, if not set the default provider project is used. | `string` | n/a | yes |
130-
| quic | Set to `true` to enable QUIC support | `bool` | `false` | no |
130+
| quic | Specifies the QUIC override policy for this resource. Set true to enable HTTP/3 and Google QUIC support, false to disable both. Defaults to null which enables support for HTTP/3 only. | `bool` | `null` | no |
131131
| random\_certificate\_suffix | Bool to enable/disable random certificate name generation. Set and keep this to true if you need to change the SSL cert. | `bool` | `false` | no |
132132
| security\_policy | The resource URL for the security policy to associate with the backend service | `string` | `null` | no |
133133
| ssl | Set to `true` to enable SSL support, requires variable `ssl_certificates` - a list of self\_link certs | `bool` | `false` | no |

Diff for: modules/dynamic_backends/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ resource "google_compute_target_https_proxy" "default" {
114114
ssl_certificates = compact(concat(var.ssl_certificates, google_compute_ssl_certificate.default.*.self_link, google_compute_managed_ssl_certificate.default.*.self_link, ), )
115115
certificate_map = var.certificate_map != null ? "//certificatemanager.googleapis.com/${var.certificate_map}" : null
116116
ssl_policy = var.ssl_policy
117-
quic_override = var.quic ? "ENABLE" : null
117+
quic_override = var.quic == null ? "NONE" : var.quic ? "ENABLE" : "DISABLE"
118118
}
119119

120120
resource "google_compute_ssl_certificate" "default" {

Diff for: modules/dynamic_backends/metadata.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,8 @@ spec:
191191
type: string
192192
required: true
193193
- name: quic
194-
description: Set to `true` to enable QUIC support
194+
description: Specifies the QUIC override policy for this resource. Set true to enable HTTP/3 and Google QUIC support, false to disable both. Defaults to null which enables support for HTTP/3 only.
195195
type: bool
196-
default: false
197196
required: false
198197
- name: random_certificate_suffix
199198
description: Bool to enable/disable random certificate name generation. Set and keep this to true if you need to change the SSL cert.

Diff for: modules/dynamic_backends/variables.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ variable "ssl_policy" {
189189

190190
variable "quic" {
191191
type = bool
192-
description = "Set to `true` to enable QUIC support"
193-
default = false
192+
description = "Specifies the QUIC override policy for this resource. Set true to enable HTTP/3 and Google QUIC support, false to disable both. Defaults to null which enables support for HTTP/3 only."
193+
default = null
194194
}
195195

196196
variable "private_key" {
@@ -254,7 +254,7 @@ variable "labels" {
254254
}
255255

256256
variable "load_balancing_scheme" {
257-
description = "Load balancing scheme type (EXTERNAL for classic external load balancer, EXTERNAL_MANAGED for Envoy-based load balancer, INTERNAL for classic internal load balancer, and INTERNAL_SELF_MANAGED for Traffic Director)"
257+
description = "Load balancing scheme type (EXTERNAL for classic external load balancer, EXTERNAL_MANAGED for Envoy-based load balancer, INTERNAL for classic internal load balancer, and INTERNAL_SELF_MANAGED for internal load balancer)"
258258
type = string
259259
default = "EXTERNAL"
260260
}

Diff for: modules/serverless_negs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Current version is 3.0. Upgrade guides:
9191
| name | Name for the forwarding rule and prefix for supporting resources | `string` | n/a | yes |
9292
| private\_key | Content of the private SSL key. Required if `ssl` is `true` and `ssl_certificates` is empty. | `string` | `null` | no |
9393
| project | The project to deploy to, if not set the default provider project is used. | `string` | n/a | yes |
94-
| quic | Set to `true` to enable QUIC support | `bool` | `false` | no |
94+
| quic | Specifies the QUIC override policy for this resource. Set true to enable HTTP/3 and Google QUIC support, false to disable both. Defaults to null which enables support for HTTP/3 only. | `bool` | `null` | no |
9595
| random\_certificate\_suffix | Bool to enable/disable random certificate name generation. Set and keep this to true if you need to change the SSL cert. | `bool` | `false` | no |
9696
| security\_policy | The resource URL for the security policy to associate with the backend service | `string` | `null` | no |
9797
| ssl | Set to `true` to enable SSL support, requires variable `ssl_certificates` - a list of self\_link certs | `bool` | `false` | no |

Diff for: modules/serverless_negs/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ resource "google_compute_target_https_proxy" "default" {
113113
ssl_certificates = compact(concat(var.ssl_certificates, google_compute_ssl_certificate.default.*.self_link, google_compute_managed_ssl_certificate.default.*.self_link, ), )
114114
certificate_map = var.certificate_map != null ? "//certificatemanager.googleapis.com/${var.certificate_map}" : null
115115
ssl_policy = var.ssl_policy
116-
quic_override = var.quic ? "ENABLE" : null
116+
quic_override = var.quic == null ? "NONE" : var.quic ? "ENABLE" : "DISABLE"
117117
}
118118

119119
resource "google_compute_ssl_certificate" "default" {

Diff for: modules/serverless_negs/metadata.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,8 @@ spec:
154154
type: string
155155
required: true
156156
- name: quic
157-
description: Set to `true` to enable QUIC support
157+
description: Specifies the QUIC override policy for this resource. Set true to enable HTTP/3 and Google QUIC support, false to disable both. Defaults to null which enables support for HTTP/3 only.
158158
type: bool
159-
default: false
160159
required: false
161160
- name: random_certificate_suffix
162161
description: Bool to enable/disable random certificate name generation. Set and keep this to true if you need to change the SSL cert.

Diff for: modules/serverless_negs/variables.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ variable "ssl_policy" {
141141

142142
variable "quic" {
143143
type = bool
144-
description = "Set to `true` to enable QUIC support"
145-
default = false
144+
description = "Specifies the QUIC override policy for this resource. Set true to enable HTTP/3 and Google QUIC support, false to disable both. Defaults to null which enables support for HTTP/3 only."
145+
default = null
146146
}
147147

148148
variable "private_key" {

Diff for: variables.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ variable "ssl_policy" {
189189

190190
variable "quic" {
191191
type = bool
192-
description = "Set to `true` to enable QUIC support"
193-
default = false
192+
description = "Specifies the QUIC override policy for this resource. Set true to enable HTTP/3 and Google QUIC support, false to disable both. Defaults to null which enables support for HTTP/3 only."
193+
default = null
194194
}
195195

196196
variable "private_key" {

0 commit comments

Comments
 (0)