diff --git a/modules/net-lb-ext/health-check.tf b/modules/net-lb-ext/health-check.tf index 250058056..cc03d96c3 100644 --- a/modules/net-lb-ext/health-check.tf +++ b/modules/net-lb-ext/health-check.tf @@ -66,13 +66,13 @@ resource "google_compute_region_health_check" "default" { dynamic "http2_health_check" { for_each = local.hc_http2 ? [""] : [] content { - host = local.hc.http.host - port = local.hc.http.port - port_name = local.hc.http.port_name - port_specification = local.hc.http.port_specification - proxy_header = local.hc.http.proxy_header - request_path = local.hc.http.request_path - response = local.hc.http.response + host = local.hc.http2.host + port = local.hc.http2.port + port_name = local.hc.http2.port_name + port_specification = local.hc.http2.port_specification + proxy_header = local.hc.http2.proxy_header + request_path = local.hc.http2.request_path + response = local.hc.http2.response } } @@ -92,12 +92,12 @@ resource "google_compute_region_health_check" "default" { dynamic "ssl_health_check" { for_each = local.hc_ssl ? [""] : [] content { - port = local.hc.tcp.port - port_name = local.hc.tcp.port_name - port_specification = local.hc.tcp.port_specification - proxy_header = local.hc.tcp.proxy_header - request = local.hc.tcp.request - response = local.hc.tcp.response + port = local.hc.ssl.port + port_name = local.hc.ssl.port_name + port_specification = local.hc.ssl.port_specification + proxy_header = local.hc.ssl.proxy_header + request = local.hc.ssl.request + response = local.hc.ssl.response } } diff --git a/modules/net-lb-int/health-check.tf b/modules/net-lb-int/health-check.tf index 18bc4ccac..063c86824 100644 --- a/modules/net-lb-int/health-check.tf +++ b/modules/net-lb-int/health-check.tf @@ -65,13 +65,13 @@ resource "google_compute_health_check" "default" { dynamic "http2_health_check" { for_each = local.hc_http2 ? [""] : [] content { - host = local.hc.http.host - port = local.hc.http.port - port_name = local.hc.http.port_name - port_specification = local.hc.http.port_specification - proxy_header = local.hc.http.proxy_header - request_path = local.hc.http.request_path - response = local.hc.http.response + host = local.hc.http2.host + port = local.hc.http2.port + port_name = local.hc.http2.port_name + port_specification = local.hc.http2.port_specification + proxy_header = local.hc.http2.proxy_header + request_path = local.hc.http2.request_path + response = local.hc.http2.response } } @@ -91,12 +91,12 @@ resource "google_compute_health_check" "default" { dynamic "ssl_health_check" { for_each = local.hc_ssl ? [""] : [] content { - port = local.hc.tcp.port - port_name = local.hc.tcp.port_name - port_specification = local.hc.tcp.port_specification - proxy_header = local.hc.tcp.proxy_header - request = local.hc.tcp.request - response = local.hc.tcp.response + port = local.hc.ssl.port + port_name = local.hc.ssl.port_name + port_specification = local.hc.ssl.port_specification + proxy_header = local.hc.ssl.proxy_header + request = local.hc.ssl.request + response = local.hc.ssl.response } } diff --git a/tests/modules/net_lb_app_ext/health-checks-grpc.tfvars b/tests/modules/net_lb_app_ext/health-checks-grpc.tfvars new file mode 100644 index 000000000..b88fedd9f --- /dev/null +++ b/tests/modules/net_lb_app_ext/health-checks-grpc.tfvars @@ -0,0 +1,12 @@ +name = "hc-test-0" +project_id = "my-project" +health_check_configs = { + grpc = { + grpc = { + port = 1123 + port_name = "grpc_port_name" + port_specification = "USE_FIXED_PORT" + service_name = "grpc_service_name" + } + } +} diff --git a/tests/modules/net_lb_app_ext/health-checks-grpc.yaml b/tests/modules/net_lb_app_ext/health-checks-grpc.yaml new file mode 100644 index 000000000..4da1157c4 --- /dev/null +++ b/tests/modules/net_lb_app_ext/health-checks-grpc.yaml @@ -0,0 +1,38 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["grpc"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: + - grpc_service_name: grpc_service_name + port: 1123 + port_name: grpc_port_name + port_specification: USE_FIXED_PORT + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: hc-test-0-grpc + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_ext/health-checks-http.tfvars b/tests/modules/net_lb_app_ext/health-checks-http.tfvars new file mode 100644 index 000000000..c682f1ea9 --- /dev/null +++ b/tests/modules/net_lb_app_ext/health-checks-http.tfvars @@ -0,0 +1,15 @@ +name = "hc-test-0" +project_id = "my-project" +health_check_configs = { + http = { + http = { + host = "http_host" + port = 2123 + port_name = "http_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "http_request_path" + response = "http_response" + } + } +} diff --git a/tests/modules/net_lb_app_ext/health-checks-http.yaml b/tests/modules/net_lb_app_ext/health-checks-http.yaml new file mode 100644 index 000000000..f5cc1cd48 --- /dev/null +++ b/tests/modules/net_lb_app_ext/health-checks-http.yaml @@ -0,0 +1,41 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["http"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: + - host: http_host + port: 2123 + port_name: http_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: http_request_path + response: http_response + https_health_check: [] + name: hc-test-0-http + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_ext/health-checks-http2.tfvars b/tests/modules/net_lb_app_ext/health-checks-http2.tfvars new file mode 100644 index 000000000..84500e45d --- /dev/null +++ b/tests/modules/net_lb_app_ext/health-checks-http2.tfvars @@ -0,0 +1,15 @@ +name = "hc-test-0" +project_id = "my-project" +health_check_configs = { + http2 = { + http2 = { + host = "http2_host" + port = 3123 + port_name = "http2_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "http2_request_path" + response = "http2_response" + } + } +} diff --git a/tests/modules/net_lb_app_ext/health-checks-http2.yaml b/tests/modules/net_lb_app_ext/health-checks-http2.yaml new file mode 100644 index 000000000..908440268 --- /dev/null +++ b/tests/modules/net_lb_app_ext/health-checks-http2.yaml @@ -0,0 +1,41 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["http2"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: + - host: http2_host + port: 3123 + port_name: http2_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: http2_request_path + response: http2_response + http_health_check: [] + https_health_check: [] + name: hc-test-0-http2 + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_ext/health-checks-https.tfvars b/tests/modules/net_lb_app_ext/health-checks-https.tfvars new file mode 100644 index 000000000..3a0c5221f --- /dev/null +++ b/tests/modules/net_lb_app_ext/health-checks-https.tfvars @@ -0,0 +1,15 @@ +name = "hc-test-0" +project_id = "my-project" +health_check_configs = { + https = { + https = { + host = "https_host" + port = 4123 + port_name = "https_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "https_request_path" + response = "https_response" + } + } +} diff --git a/tests/modules/net_lb_app_ext/health-checks-https.yaml b/tests/modules/net_lb_app_ext/health-checks-https.yaml new file mode 100644 index 000000000..636e228eb --- /dev/null +++ b/tests/modules/net_lb_app_ext/health-checks-https.yaml @@ -0,0 +1,41 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["https"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: + - host: https_host + port: 4123 + port_name: https_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: https_request_path + response: https_response + name: hc-test-0-https + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_ext/health-checks-ssl.tfvars b/tests/modules/net_lb_app_ext/health-checks-ssl.tfvars new file mode 100644 index 000000000..e03dcc27f --- /dev/null +++ b/tests/modules/net_lb_app_ext/health-checks-ssl.tfvars @@ -0,0 +1,14 @@ +name = "hc-test-0" +project_id = "my-project" +health_check_configs = { + ssl = { + ssl = { + port = 6123 + port_name = "ssl_port_name" + port_specification = "USE_FIXED_PORT" + proxy_header = "PROXY_V1" + request = "ssl_request" + response = "ssl_response" + } + } +} diff --git a/tests/modules/net_lb_app_ext/health-checks-ssl.yaml b/tests/modules/net_lb_app_ext/health-checks-ssl.yaml new file mode 100644 index 000000000..86911d316 --- /dev/null +++ b/tests/modules/net_lb_app_ext/health-checks-ssl.yaml @@ -0,0 +1,40 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["ssl"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: hc-test-0-ssl + project: my-project + source_regions: null + ssl_health_check: + - port: 6123 + port_name: ssl_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request: ssl_request + response: ssl_response + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_ext/health-checks-tcp.tfvars b/tests/modules/net_lb_app_ext/health-checks-tcp.tfvars new file mode 100644 index 000000000..ee6df1f31 --- /dev/null +++ b/tests/modules/net_lb_app_ext/health-checks-tcp.tfvars @@ -0,0 +1,14 @@ +name = "hc-test-0" +project_id = "my-project" +health_check_configs = { + tcp = { + tcp = { + port = 5123 + port_name = "tcp_port_name" + port_specification = "USE_FIXED_PORT" + proxy_header = "PROXY_V1" + request = "tcp_request" + response = "tcp_response" + } + } +} diff --git a/tests/modules/net_lb_app_ext/health-checks-tcp.yaml b/tests/modules/net_lb_app_ext/health-checks-tcp.yaml new file mode 100644 index 000000000..6003269b1 --- /dev/null +++ b/tests/modules/net_lb_app_ext/health-checks-tcp.yaml @@ -0,0 +1,40 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["tcp"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: hc-test-0-tcp + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: + - port: 5123 + port_name: tcp_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request: tcp_request + response: tcp_response + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_ext/tftest.yaml b/tests/modules/net_lb_app_ext/tftest.yaml index 473cf227c..392a925e9 100644 --- a/tests/modules/net_lb_app_ext/tftest.yaml +++ b/tests/modules/net_lb_app_ext/tftest.yaml @@ -16,3 +16,9 @@ module: modules/net-lb-app-ext tests: test-plan: test-plan-llp: + health-checks-grpc: + health-checks-http: + health-checks-http2: + health-checks-https: + health-checks-ssl: + health-checks-tcp: diff --git a/tests/modules/net_lb_app_int/health-checks-grpc.tfvars b/tests/modules/net_lb_app_int/health-checks-grpc.tfvars new file mode 100644 index 000000000..b88fedd9f --- /dev/null +++ b/tests/modules/net_lb_app_int/health-checks-grpc.tfvars @@ -0,0 +1,12 @@ +name = "hc-test-0" +project_id = "my-project" +health_check_configs = { + grpc = { + grpc = { + port = 1123 + port_name = "grpc_port_name" + port_specification = "USE_FIXED_PORT" + service_name = "grpc_service_name" + } + } +} diff --git a/tests/modules/net_lb_app_int/health-checks-grpc.yaml b/tests/modules/net_lb_app_int/health-checks-grpc.yaml new file mode 100644 index 000000000..4da1157c4 --- /dev/null +++ b/tests/modules/net_lb_app_int/health-checks-grpc.yaml @@ -0,0 +1,38 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["grpc"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: + - grpc_service_name: grpc_service_name + port: 1123 + port_name: grpc_port_name + port_specification: USE_FIXED_PORT + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: hc-test-0-grpc + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_int/health-checks-http.tfvars b/tests/modules/net_lb_app_int/health-checks-http.tfvars new file mode 100644 index 000000000..c682f1ea9 --- /dev/null +++ b/tests/modules/net_lb_app_int/health-checks-http.tfvars @@ -0,0 +1,15 @@ +name = "hc-test-0" +project_id = "my-project" +health_check_configs = { + http = { + http = { + host = "http_host" + port = 2123 + port_name = "http_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "http_request_path" + response = "http_response" + } + } +} diff --git a/tests/modules/net_lb_app_int/health-checks-http.yaml b/tests/modules/net_lb_app_int/health-checks-http.yaml new file mode 100644 index 000000000..f5cc1cd48 --- /dev/null +++ b/tests/modules/net_lb_app_int/health-checks-http.yaml @@ -0,0 +1,41 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["http"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: + - host: http_host + port: 2123 + port_name: http_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: http_request_path + response: http_response + https_health_check: [] + name: hc-test-0-http + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_int/health-checks-http2.tfvars b/tests/modules/net_lb_app_int/health-checks-http2.tfvars new file mode 100644 index 000000000..84500e45d --- /dev/null +++ b/tests/modules/net_lb_app_int/health-checks-http2.tfvars @@ -0,0 +1,15 @@ +name = "hc-test-0" +project_id = "my-project" +health_check_configs = { + http2 = { + http2 = { + host = "http2_host" + port = 3123 + port_name = "http2_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "http2_request_path" + response = "http2_response" + } + } +} diff --git a/tests/modules/net_lb_app_int/health-checks-http2.yaml b/tests/modules/net_lb_app_int/health-checks-http2.yaml new file mode 100644 index 000000000..908440268 --- /dev/null +++ b/tests/modules/net_lb_app_int/health-checks-http2.yaml @@ -0,0 +1,41 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["http2"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: + - host: http2_host + port: 3123 + port_name: http2_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: http2_request_path + response: http2_response + http_health_check: [] + https_health_check: [] + name: hc-test-0-http2 + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_int/health-checks-https.tfvars b/tests/modules/net_lb_app_int/health-checks-https.tfvars new file mode 100644 index 000000000..3a0c5221f --- /dev/null +++ b/tests/modules/net_lb_app_int/health-checks-https.tfvars @@ -0,0 +1,15 @@ +name = "hc-test-0" +project_id = "my-project" +health_check_configs = { + https = { + https = { + host = "https_host" + port = 4123 + port_name = "https_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "https_request_path" + response = "https_response" + } + } +} diff --git a/tests/modules/net_lb_app_int/health-checks-https.yaml b/tests/modules/net_lb_app_int/health-checks-https.yaml new file mode 100644 index 000000000..636e228eb --- /dev/null +++ b/tests/modules/net_lb_app_int/health-checks-https.yaml @@ -0,0 +1,41 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["https"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: + - host: https_host + port: 4123 + port_name: https_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: https_request_path + response: https_response + name: hc-test-0-https + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_int/health-checks-ssl.tfvars b/tests/modules/net_lb_app_int/health-checks-ssl.tfvars new file mode 100644 index 000000000..e03dcc27f --- /dev/null +++ b/tests/modules/net_lb_app_int/health-checks-ssl.tfvars @@ -0,0 +1,14 @@ +name = "hc-test-0" +project_id = "my-project" +health_check_configs = { + ssl = { + ssl = { + port = 6123 + port_name = "ssl_port_name" + port_specification = "USE_FIXED_PORT" + proxy_header = "PROXY_V1" + request = "ssl_request" + response = "ssl_response" + } + } +} diff --git a/tests/modules/net_lb_app_int/health-checks-ssl.yaml b/tests/modules/net_lb_app_int/health-checks-ssl.yaml new file mode 100644 index 000000000..86911d316 --- /dev/null +++ b/tests/modules/net_lb_app_int/health-checks-ssl.yaml @@ -0,0 +1,40 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["ssl"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: hc-test-0-ssl + project: my-project + source_regions: null + ssl_health_check: + - port: 6123 + port_name: ssl_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request: ssl_request + response: ssl_response + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_int/health-checks-tcp.tfvars b/tests/modules/net_lb_app_int/health-checks-tcp.tfvars new file mode 100644 index 000000000..ee6df1f31 --- /dev/null +++ b/tests/modules/net_lb_app_int/health-checks-tcp.tfvars @@ -0,0 +1,14 @@ +name = "hc-test-0" +project_id = "my-project" +health_check_configs = { + tcp = { + tcp = { + port = 5123 + port_name = "tcp_port_name" + port_specification = "USE_FIXED_PORT" + proxy_header = "PROXY_V1" + request = "tcp_request" + response = "tcp_response" + } + } +} diff --git a/tests/modules/net_lb_app_int/health-checks-tcp.yaml b/tests/modules/net_lb_app_int/health-checks-tcp.yaml new file mode 100644 index 000000000..6003269b1 --- /dev/null +++ b/tests/modules/net_lb_app_int/health-checks-tcp.yaml @@ -0,0 +1,40 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["tcp"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: hc-test-0-tcp + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: + - port: 5123 + port_name: tcp_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request: tcp_request + response: tcp_response + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_int/tftest.yaml b/tests/modules/net_lb_app_int/tftest.yaml index 4fd90dc35..195955d05 100644 --- a/tests/modules/net_lb_app_int/tftest.yaml +++ b/tests/modules/net_lb_app_int/tftest.yaml @@ -20,6 +20,12 @@ tests: groups: health-checks-custom: health-checks-external: + health-checks-grpc: + health-checks-http: + health-checks-http2: + health-checks-https: + health-checks-ssl: + health-checks-tcp: https: negs: ssl: diff --git a/tests/modules/net_lb_app_int_cross_region/health-checks-grpc.tfvars b/tests/modules/net_lb_app_int_cross_region/health-checks-grpc.tfvars new file mode 100644 index 000000000..5f1c6ec4e --- /dev/null +++ b/tests/modules/net_lb_app_int_cross_region/health-checks-grpc.tfvars @@ -0,0 +1,28 @@ +name = "hc-test-0" +project_id = "my-project" +backend_service_configs = { + default = { + backends = [{ + group = "projects/myprj/zones/europe-west1-a/instanceGroups/my-ig-ew1" + }, { + group = "projects/myprj/zones/europe-west4-a/instanceGroups/my-ig-ew4" + }] + } +} +vpc_config = { + network = "network" + subnetworks = { + europe-west1 = "subnet-ew1" + europe-west4 = "subnet-ew4" + } +} +health_check_configs = { + grpc = { + grpc = { + port = 1123 + port_name = "grpc_port_name" + port_specification = "USE_FIXED_PORT" + service_name = "grpc_service_name" + } + } +} diff --git a/tests/modules/net_lb_app_int_cross_region/health-checks-grpc.yaml b/tests/modules/net_lb_app_int_cross_region/health-checks-grpc.yaml new file mode 100644 index 000000000..4da1157c4 --- /dev/null +++ b/tests/modules/net_lb_app_int_cross_region/health-checks-grpc.yaml @@ -0,0 +1,38 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["grpc"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: + - grpc_service_name: grpc_service_name + port: 1123 + port_name: grpc_port_name + port_specification: USE_FIXED_PORT + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: hc-test-0-grpc + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_int_cross_region/health-checks-http.tfvars b/tests/modules/net_lb_app_int_cross_region/health-checks-http.tfvars new file mode 100644 index 000000000..2bf954e76 --- /dev/null +++ b/tests/modules/net_lb_app_int_cross_region/health-checks-http.tfvars @@ -0,0 +1,31 @@ +name = "hc-test-0" +project_id = "my-project" +backend_service_configs = { + default = { + backends = [{ + group = "projects/myprj/zones/europe-west1-a/instanceGroups/my-ig-ew1" + }, { + group = "projects/myprj/zones/europe-west4-a/instanceGroups/my-ig-ew4" + }] + } +} +vpc_config = { + network = "network" + subnetworks = { + europe-west1 = "subnet-ew1" + europe-west4 = "subnet-ew4" + } +} +health_check_configs = { + http = { + http = { + host = "http_host" + port = 2123 + port_name = "http_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "http_request_path" + response = "http_response" + } + } +} diff --git a/tests/modules/net_lb_app_int_cross_region/health-checks-http.yaml b/tests/modules/net_lb_app_int_cross_region/health-checks-http.yaml new file mode 100644 index 000000000..f5cc1cd48 --- /dev/null +++ b/tests/modules/net_lb_app_int_cross_region/health-checks-http.yaml @@ -0,0 +1,41 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["http"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: + - host: http_host + port: 2123 + port_name: http_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: http_request_path + response: http_response + https_health_check: [] + name: hc-test-0-http + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_int_cross_region/health-checks-http2.tfvars b/tests/modules/net_lb_app_int_cross_region/health-checks-http2.tfvars new file mode 100644 index 000000000..b94cccef6 --- /dev/null +++ b/tests/modules/net_lb_app_int_cross_region/health-checks-http2.tfvars @@ -0,0 +1,31 @@ +name = "hc-test-0" +project_id = "my-project" +backend_service_configs = { + default = { + backends = [{ + group = "projects/myprj/zones/europe-west1-a/instanceGroups/my-ig-ew1" + }, { + group = "projects/myprj/zones/europe-west4-a/instanceGroups/my-ig-ew4" + }] + } +} +vpc_config = { + network = "network" + subnetworks = { + europe-west1 = "subnet-ew1" + europe-west4 = "subnet-ew4" + } +} +health_check_configs = { + http2 = { + http2 = { + host = "http2_host" + port = 3123 + port_name = "http2_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "http2_request_path" + response = "http2_response" + } + } +} diff --git a/tests/modules/net_lb_app_int_cross_region/health-checks-http2.yaml b/tests/modules/net_lb_app_int_cross_region/health-checks-http2.yaml new file mode 100644 index 000000000..908440268 --- /dev/null +++ b/tests/modules/net_lb_app_int_cross_region/health-checks-http2.yaml @@ -0,0 +1,41 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["http2"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: + - host: http2_host + port: 3123 + port_name: http2_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: http2_request_path + response: http2_response + http_health_check: [] + https_health_check: [] + name: hc-test-0-http2 + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_int_cross_region/health-checks-https.tfvars b/tests/modules/net_lb_app_int_cross_region/health-checks-https.tfvars new file mode 100644 index 000000000..f1e5e2a6e --- /dev/null +++ b/tests/modules/net_lb_app_int_cross_region/health-checks-https.tfvars @@ -0,0 +1,31 @@ +name = "hc-test-0" +project_id = "my-project" +backend_service_configs = { + default = { + backends = [{ + group = "projects/myprj/zones/europe-west1-a/instanceGroups/my-ig-ew1" + }, { + group = "projects/myprj/zones/europe-west4-a/instanceGroups/my-ig-ew4" + }] + } +} +vpc_config = { + network = "network" + subnetworks = { + europe-west1 = "subnet-ew1" + europe-west4 = "subnet-ew4" + } +} +health_check_configs = { + https = { + https = { + host = "https_host" + port = 4123 + port_name = "https_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "https_request_path" + response = "https_response" + } + } +} diff --git a/tests/modules/net_lb_app_int_cross_region/health-checks-https.yaml b/tests/modules/net_lb_app_int_cross_region/health-checks-https.yaml new file mode 100644 index 000000000..636e228eb --- /dev/null +++ b/tests/modules/net_lb_app_int_cross_region/health-checks-https.yaml @@ -0,0 +1,41 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["https"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: + - host: https_host + port: 4123 + port_name: https_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: https_request_path + response: https_response + name: hc-test-0-https + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_int_cross_region/health-checks-ssl.tfvars b/tests/modules/net_lb_app_int_cross_region/health-checks-ssl.tfvars new file mode 100644 index 000000000..13ea3ff09 --- /dev/null +++ b/tests/modules/net_lb_app_int_cross_region/health-checks-ssl.tfvars @@ -0,0 +1,30 @@ +name = "hc-test-0" +project_id = "my-project" +backend_service_configs = { + default = { + backends = [{ + group = "projects/myprj/zones/europe-west1-a/instanceGroups/my-ig-ew1" + }, { + group = "projects/myprj/zones/europe-west4-a/instanceGroups/my-ig-ew4" + }] + } +} +vpc_config = { + network = "network" + subnetworks = { + europe-west1 = "subnet-ew1" + europe-west4 = "subnet-ew4" + } +} +health_check_configs = { + ssl = { + ssl = { + port = 6123 + port_name = "ssl_port_name" + port_specification = "USE_FIXED_PORT" + proxy_header = "PROXY_V1" + request = "ssl_request" + response = "ssl_response" + } + } +} diff --git a/tests/modules/net_lb_app_int_cross_region/health-checks-ssl.yaml b/tests/modules/net_lb_app_int_cross_region/health-checks-ssl.yaml new file mode 100644 index 000000000..86911d316 --- /dev/null +++ b/tests/modules/net_lb_app_int_cross_region/health-checks-ssl.yaml @@ -0,0 +1,40 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["ssl"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: hc-test-0-ssl + project: my-project + source_regions: null + ssl_health_check: + - port: 6123 + port_name: ssl_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request: ssl_request + response: ssl_response + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_int_cross_region/health-checks-tcp.tfvars b/tests/modules/net_lb_app_int_cross_region/health-checks-tcp.tfvars new file mode 100644 index 000000000..26b16aa47 --- /dev/null +++ b/tests/modules/net_lb_app_int_cross_region/health-checks-tcp.tfvars @@ -0,0 +1,30 @@ +name = "hc-test-0" +project_id = "my-project" +backend_service_configs = { + default = { + backends = [{ + group = "projects/myprj/zones/europe-west1-a/instanceGroups/my-ig-ew1" + }, { + group = "projects/myprj/zones/europe-west4-a/instanceGroups/my-ig-ew4" + }] + } +} +vpc_config = { + network = "network" + subnetworks = { + europe-west1 = "subnet-ew1" + europe-west4 = "subnet-ew4" + } +} +health_check_configs = { + tcp = { + tcp = { + port = 5123 + port_name = "tcp_port_name" + port_specification = "USE_FIXED_PORT" + proxy_header = "PROXY_V1" + request = "tcp_request" + response = "tcp_response" + } + } +} diff --git a/tests/modules/net_lb_app_int_cross_region/health-checks-tcp.yaml b/tests/modules/net_lb_app_int_cross_region/health-checks-tcp.yaml new file mode 100644 index 000000000..6003269b1 --- /dev/null +++ b/tests/modules/net_lb_app_int_cross_region/health-checks-tcp.yaml @@ -0,0 +1,40 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default["tcp"]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: hc-test-0-tcp + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: + - port: 5123 + port_name: tcp_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request: tcp_request + response: tcp_response + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_app_int_cross_region/tftest.yaml b/tests/modules/net_lb_app_int_cross_region/tftest.yaml new file mode 100644 index 000000000..b17f57cf2 --- /dev/null +++ b/tests/modules/net_lb_app_int_cross_region/tftest.yaml @@ -0,0 +1,22 @@ +# Copyright 2023 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. + +module: modules/net-lb-app-int-cross-region +tests: + health-checks-grpc: + health-checks-http: + health-checks-http2: + health-checks-https: + health-checks-ssl: + health-checks-tcp: diff --git a/tests/modules/net_lb_ext/health-checks-grpc.tfvars b/tests/modules/net_lb_ext/health-checks-grpc.tfvars new file mode 100644 index 000000000..9c4e82d66 --- /dev/null +++ b/tests/modules/net_lb_ext/health-checks-grpc.tfvars @@ -0,0 +1,16 @@ +project_id = "my-project" +region = "europe-west1" +name = "nlb-test" +backends = [{ + group = "foo" + failover = false +}] + +health_check_config = { + grpc = { + port = 1123 + port_name = "grpc_port_name" + port_specification = "USE_FIXED_PORT" + service_name = "grpc_service_name" + } +} diff --git a/tests/modules/net_lb_ext/health-checks-grpc.yaml b/tests/modules/net_lb_ext/health-checks-grpc.yaml new file mode 100644 index 000000000..bcc32b1eb --- /dev/null +++ b/tests/modules/net_lb_ext/health-checks-grpc.yaml @@ -0,0 +1,37 @@ +# Copyright 2025 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. + +values: + google_compute_region_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: + - grpc_service_name: grpc_service_name + port: 1123 + port_name: grpc_port_name + port_specification: USE_FIXED_PORT + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: nlb-test + project: my-project + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_region_health_check: 1 diff --git a/tests/modules/net_lb_ext/health-checks-http.tfvars b/tests/modules/net_lb_ext/health-checks-http.tfvars new file mode 100644 index 000000000..9e3f05332 --- /dev/null +++ b/tests/modules/net_lb_ext/health-checks-http.tfvars @@ -0,0 +1,19 @@ +project_id = "my-project" +region = "europe-west1" +name = "nlb-test" +backends = [{ + group = "foo" + failover = false +}] + +health_check_config = { + http = { + host = "http_host" + port = 2123 + port_name = "http_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "http_request_path" + response = "http_response" + } +} diff --git a/tests/modules/net_lb_ext/health-checks-http.yaml b/tests/modules/net_lb_ext/health-checks-http.yaml new file mode 100644 index 000000000..bc1bdc0ab --- /dev/null +++ b/tests/modules/net_lb_ext/health-checks-http.yaml @@ -0,0 +1,40 @@ +# Copyright 2025 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. + +values: + google_compute_region_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: + - host: http_host + port: 2123 + port_name: http_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: http_request_path + response: http_response + https_health_check: [] + name: nlb-test + project: my-project + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_region_health_check: 1 diff --git a/tests/modules/net_lb_ext/health-checks-http2.tfvars b/tests/modules/net_lb_ext/health-checks-http2.tfvars new file mode 100644 index 000000000..bafc62feb --- /dev/null +++ b/tests/modules/net_lb_ext/health-checks-http2.tfvars @@ -0,0 +1,19 @@ +project_id = "my-project" +region = "europe-west1" +name = "nlb-test" +backends = [{ + group = "foo" + failover = false +}] + +health_check_config = { + http2 = { + host = "http2_host" + port = 3123 + port_name = "http2_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "http2_request_path" + response = "http2_response" + } +} diff --git a/tests/modules/net_lb_ext/health-checks-http2.yaml b/tests/modules/net_lb_ext/health-checks-http2.yaml new file mode 100644 index 000000000..b5189a568 --- /dev/null +++ b/tests/modules/net_lb_ext/health-checks-http2.yaml @@ -0,0 +1,40 @@ +# Copyright 2025 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. + +values: + google_compute_region_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: + - host: http2_host + port: 3123 + port_name: http2_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: http2_request_path + response: http2_response + http_health_check: [] + https_health_check: [] + name: nlb-test + project: my-project + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_region_health_check: 1 diff --git a/tests/modules/net_lb_ext/health-checks-https.tfvars b/tests/modules/net_lb_ext/health-checks-https.tfvars new file mode 100644 index 000000000..216184287 --- /dev/null +++ b/tests/modules/net_lb_ext/health-checks-https.tfvars @@ -0,0 +1,19 @@ +project_id = "my-project" +region = "europe-west1" +name = "nlb-test" +backends = [{ + group = "foo" + failover = false +}] + +health_check_config = { + https = { + host = "https_host" + port = 4123 + port_name = "https_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "https_request_path" + response = "https_response" + } +} diff --git a/tests/modules/net_lb_ext/health-checks-https.yaml b/tests/modules/net_lb_ext/health-checks-https.yaml new file mode 100644 index 000000000..b184a3eaa --- /dev/null +++ b/tests/modules/net_lb_ext/health-checks-https.yaml @@ -0,0 +1,40 @@ +# Copyright 2025 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. + +values: + google_compute_region_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: + - host: https_host + port: 4123 + port_name: https_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: https_request_path + response: https_response + name: nlb-test + project: my-project + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_region_health_check: 1 diff --git a/tests/modules/net_lb_ext/health-checks-ssl.tfvars b/tests/modules/net_lb_ext/health-checks-ssl.tfvars new file mode 100644 index 000000000..926a4f32d --- /dev/null +++ b/tests/modules/net_lb_ext/health-checks-ssl.tfvars @@ -0,0 +1,18 @@ +project_id = "my-project" +region = "europe-west1" +name = "nlb-test" +backends = [{ + group = "foo" + failover = false +}] + +health_check_config = { + ssl = { + port = 6123 + port_name = "ssl_port_name" + port_specification = "USE_FIXED_PORT" + proxy_header = "PROXY_V1" + request = "ssl_request" + response = "ssl_response" + } +} diff --git a/tests/modules/net_lb_ext/health-checks-ssl.yaml b/tests/modules/net_lb_ext/health-checks-ssl.yaml new file mode 100644 index 000000000..9cbc747c2 --- /dev/null +++ b/tests/modules/net_lb_ext/health-checks-ssl.yaml @@ -0,0 +1,39 @@ +# Copyright 2025 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. + +values: + google_compute_region_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: nlb-test + project: my-project + ssl_health_check: + - port: 6123 + port_name: ssl_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request: ssl_request + response: ssl_response + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_region_health_check: 1 diff --git a/tests/modules/net_lb_ext/health-checks-tcp.tfvars b/tests/modules/net_lb_ext/health-checks-tcp.tfvars new file mode 100644 index 000000000..c8da168bb --- /dev/null +++ b/tests/modules/net_lb_ext/health-checks-tcp.tfvars @@ -0,0 +1,18 @@ +project_id = "my-project" +region = "europe-west1" +name = "nlb-test" +backends = [{ + group = "foo" + failover = false +}] + +health_check_config = { + tcp = { + port = 5123 + port_name = "tcp_port_name" + port_specification = "USE_FIXED_PORT" + proxy_header = "PROXY_V1" + request = "tcp_request" + response = "tcp_response" + } +} diff --git a/tests/modules/net_lb_ext/health-checks-tcp.yaml b/tests/modules/net_lb_ext/health-checks-tcp.yaml new file mode 100644 index 000000000..fa7fca99d --- /dev/null +++ b/tests/modules/net_lb_ext/health-checks-tcp.yaml @@ -0,0 +1,39 @@ +# Copyright 2025 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. + +values: + google_compute_region_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: nlb-test + project: my-project + ssl_health_check: [] + tcp_health_check: + - port: 5123 + port_name: tcp_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request: tcp_request + response: tcp_response + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_region_health_check: 1 diff --git a/tests/modules/net_lb_ext/tftest.yaml b/tests/modules/net_lb_ext/tftest.yaml index c219e478d..c223ec1e8 100644 --- a/tests/modules/net_lb_ext/tftest.yaml +++ b/tests/modules/net_lb_ext/tftest.yaml @@ -18,3 +18,9 @@ tests: defaults: dual-stack: forwarding-rule: + health-checks-grpc: + health-checks-http: + health-checks-http2: + health-checks-https: + health-checks-ssl: + health-checks-tcp: diff --git a/tests/modules/net_lb_int/health-checks-grpc.tfvars b/tests/modules/net_lb_int/health-checks-grpc.tfvars new file mode 100644 index 000000000..78975d015 --- /dev/null +++ b/tests/modules/net_lb_int/health-checks-grpc.tfvars @@ -0,0 +1,19 @@ +project_id = "my-project" +region = "europe-west1" +name = "ilb-test" +vpc_config = { + network = "default" + subnetwork = "default" +} +backends = [{ + group = "foo" + failover = false +}] +health_check_config = { + grpc = { + port = 1123 + port_name = "grpc_port_name" + port_specification = "USE_FIXED_PORT" + service_name = "grpc_service_name" + } +} diff --git a/tests/modules/net_lb_int/health-checks-grpc.yaml b/tests/modules/net_lb_int/health-checks-grpc.yaml new file mode 100644 index 000000000..8b15ac693 --- /dev/null +++ b/tests/modules/net_lb_int/health-checks-grpc.yaml @@ -0,0 +1,38 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: + - grpc_service_name: grpc_service_name + port: 1123 + port_name: grpc_port_name + port_specification: USE_FIXED_PORT + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: ilb-test + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_int/health-checks-http.tfvars b/tests/modules/net_lb_int/health-checks-http.tfvars new file mode 100644 index 000000000..7bc933fdb --- /dev/null +++ b/tests/modules/net_lb_int/health-checks-http.tfvars @@ -0,0 +1,22 @@ +project_id = "my-project" +region = "europe-west1" +name = "ilb-test" +vpc_config = { + network = "default" + subnetwork = "default" +} +backends = [{ + group = "foo" + failover = false +}] +health_check_config = { + http = { + host = "http_host" + port = 2123 + port_name = "http_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "http_request_path" + response = "http_response" + } +} diff --git a/tests/modules/net_lb_int/health-checks-http.yaml b/tests/modules/net_lb_int/health-checks-http.yaml new file mode 100644 index 000000000..b2c9fe915 --- /dev/null +++ b/tests/modules/net_lb_int/health-checks-http.yaml @@ -0,0 +1,41 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: + - host: http_host + port: 2123 + port_name: http_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: http_request_path + response: http_response + https_health_check: [] + name: ilb-test + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_int/health-checks-http2.tfvars b/tests/modules/net_lb_int/health-checks-http2.tfvars new file mode 100644 index 000000000..2fdcbee4c --- /dev/null +++ b/tests/modules/net_lb_int/health-checks-http2.tfvars @@ -0,0 +1,22 @@ +project_id = "my-project" +region = "europe-west1" +name = "ilb-test" +vpc_config = { + network = "default" + subnetwork = "default" +} +backends = [{ + group = "foo" + failover = false +}] +health_check_config = { + http2 = { + host = "http2_host" + port = 3123 + port_name = "http2_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "http2_request_path" + response = "http2_response" + } +} diff --git a/tests/modules/net_lb_int/health-checks-http2.yaml b/tests/modules/net_lb_int/health-checks-http2.yaml new file mode 100644 index 000000000..ddbdaaab9 --- /dev/null +++ b/tests/modules/net_lb_int/health-checks-http2.yaml @@ -0,0 +1,41 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: + - host: http2_host + port: 3123 + port_name: http2_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: http2_request_path + response: http2_response + http_health_check: [] + https_health_check: [] + name: ilb-test + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_int/health-checks-https.tfvars b/tests/modules/net_lb_int/health-checks-https.tfvars new file mode 100644 index 000000000..0863d0340 --- /dev/null +++ b/tests/modules/net_lb_int/health-checks-https.tfvars @@ -0,0 +1,22 @@ +project_id = "my-project" +region = "europe-west1" +name = "ilb-test" +vpc_config = { + network = "default" + subnetwork = "default" +} +backends = [{ + group = "foo" + failover = false +}] +health_check_config = { + https = { + host = "https_host" + port = 4123 + port_name = "https_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "https_request_path" + response = "https_response" + } +} diff --git a/tests/modules/net_lb_int/health-checks-https.yaml b/tests/modules/net_lb_int/health-checks-https.yaml new file mode 100644 index 000000000..33928296c --- /dev/null +++ b/tests/modules/net_lb_int/health-checks-https.yaml @@ -0,0 +1,41 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: + - host: https_host + port: 4123 + port_name: https_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: https_request_path + response: https_response + name: ilb-test + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_int/health-checks-ssl.tfvars b/tests/modules/net_lb_int/health-checks-ssl.tfvars new file mode 100644 index 000000000..e895bf5f3 --- /dev/null +++ b/tests/modules/net_lb_int/health-checks-ssl.tfvars @@ -0,0 +1,21 @@ +project_id = "my-project" +region = "europe-west1" +name = "ilb-test" +vpc_config = { + network = "default" + subnetwork = "default" +} +backends = [{ + group = "foo" + failover = false +}] +health_check_config = { + ssl = { + port = 6123 + port_name = "ssl_port_name" + port_specification = "USE_FIXED_PORT" + proxy_header = "PROXY_V1" + request = "ssl_request" + response = "ssl_response" + } +} diff --git a/tests/modules/net_lb_int/health-checks-ssl.yaml b/tests/modules/net_lb_int/health-checks-ssl.yaml new file mode 100644 index 000000000..19e340d33 --- /dev/null +++ b/tests/modules/net_lb_int/health-checks-ssl.yaml @@ -0,0 +1,40 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: ilb-test + project: my-project + source_regions: null + ssl_health_check: + - port: 6123 + port_name: ssl_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request: ssl_request + response: ssl_response + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_int/health-checks-tcp.tfvars b/tests/modules/net_lb_int/health-checks-tcp.tfvars new file mode 100644 index 000000000..73fd07574 --- /dev/null +++ b/tests/modules/net_lb_int/health-checks-tcp.tfvars @@ -0,0 +1,21 @@ +project_id = "my-project" +region = "europe-west1" +name = "ilb-test" +vpc_config = { + network = "default" + subnetwork = "default" +} +backends = [{ + group = "foo" + failover = false +}] +health_check_config = { + tcp = { + port = 5123 + port_name = "tcp_port_name" + port_specification = "USE_FIXED_PORT" + proxy_header = "PROXY_V1" + request = "tcp_request" + response = "tcp_response" + } +} diff --git a/tests/modules/net_lb_int/health-checks-tcp.yaml b/tests/modules/net_lb_int/health-checks-tcp.yaml new file mode 100644 index 000000000..8f5499c90 --- /dev/null +++ b/tests/modules/net_lb_int/health-checks-tcp.yaml @@ -0,0 +1,40 @@ +# Copyright 2025 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. + +values: + google_compute_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: ilb-test + project: my-project + source_regions: null + ssl_health_check: [] + tcp_health_check: + - port: 5123 + port_name: tcp_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request: tcp_request + response: tcp_response + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_health_check: 1 diff --git a/tests/modules/net_lb_int/tftest.yaml b/tests/modules/net_lb_int/tftest.yaml index 0837391d7..48254efb8 100644 --- a/tests/modules/net_lb_int/tftest.yaml +++ b/tests/modules/net_lb_int/tftest.yaml @@ -18,3 +18,9 @@ tests: context: defaults: forwarding-rule: + health-checks-grpc: + health-checks-http: + health-checks-http2: + health-checks-https: + health-checks-ssl: + health-checks-tcp: diff --git a/tests/modules/net_lb_proxy_int/common.tfvars b/tests/modules/net_lb_proxy_int/common.tfvars new file mode 100644 index 000000000..32f84db9c --- /dev/null +++ b/tests/modules/net_lb_proxy_int/common.tfvars @@ -0,0 +1,12 @@ +name = "hc-test-0" +project_id = "my-project" +region = "europe-west4" +backend_service_config = { + backends = [{ + group = "projects/myprj/zones/europe-west4-a/instanceGroups/my-ig" + }] +} +vpc_config = { + network = "network" + subnetwork = "subnet" +} diff --git a/tests/modules/net_lb_proxy_int/health-checks-grpc.tfvars b/tests/modules/net_lb_proxy_int/health-checks-grpc.tfvars new file mode 100644 index 000000000..8ae52d8b1 --- /dev/null +++ b/tests/modules/net_lb_proxy_int/health-checks-grpc.tfvars @@ -0,0 +1,8 @@ +health_check_config = { + grpc = { + port = 1123 + port_name = "grpc_port_name" + port_specification = "USE_FIXED_PORT" + service_name = "grpc_service_name" + } +} diff --git a/tests/modules/net_lb_proxy_int/health-checks-grpc.yaml b/tests/modules/net_lb_proxy_int/health-checks-grpc.yaml new file mode 100644 index 000000000..18f02fc53 --- /dev/null +++ b/tests/modules/net_lb_proxy_int/health-checks-grpc.yaml @@ -0,0 +1,37 @@ +# Copyright 2025 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. + +values: + google_compute_region_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: + - grpc_service_name: grpc_service_name + port: 1123 + port_name: grpc_port_name + port_specification: USE_FIXED_PORT + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: hc-test-0 + project: my-project + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_region_health_check: 1 diff --git a/tests/modules/net_lb_proxy_int/health-checks-http.tfvars b/tests/modules/net_lb_proxy_int/health-checks-http.tfvars new file mode 100644 index 000000000..8b010c0e1 --- /dev/null +++ b/tests/modules/net_lb_proxy_int/health-checks-http.tfvars @@ -0,0 +1,11 @@ +health_check_config = { + http = { + host = "http_host" + port = 2123 + port_name = "http_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "http_request_path" + response = "http_response" + } +} diff --git a/tests/modules/net_lb_proxy_int/health-checks-http.yaml b/tests/modules/net_lb_proxy_int/health-checks-http.yaml new file mode 100644 index 000000000..324633acc --- /dev/null +++ b/tests/modules/net_lb_proxy_int/health-checks-http.yaml @@ -0,0 +1,40 @@ +# Copyright 2025 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. + +values: + google_compute_region_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: + - host: http_host + port: 2123 + port_name: http_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: http_request_path + response: http_response + https_health_check: [] + name: hc-test-0 + project: my-project + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_region_health_check: 1 diff --git a/tests/modules/net_lb_proxy_int/health-checks-http2.tfvars b/tests/modules/net_lb_proxy_int/health-checks-http2.tfvars new file mode 100644 index 000000000..705695faf --- /dev/null +++ b/tests/modules/net_lb_proxy_int/health-checks-http2.tfvars @@ -0,0 +1,11 @@ +health_check_config = { + http2 = { + host = "http2_host" + port = 3123 + port_name = "http2_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "http2_request_path" + response = "http2_response" + } +} diff --git a/tests/modules/net_lb_proxy_int/health-checks-http2.yaml b/tests/modules/net_lb_proxy_int/health-checks-http2.yaml new file mode 100644 index 000000000..31210c2b5 --- /dev/null +++ b/tests/modules/net_lb_proxy_int/health-checks-http2.yaml @@ -0,0 +1,40 @@ +# Copyright 2025 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. + +values: + google_compute_region_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: + - host: http2_host + port: 3123 + port_name: http2_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: http2_request_path + response: http2_response + http_health_check: [] + https_health_check: [] + name: hc-test-0 + project: my-project + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_region_health_check: 1 diff --git a/tests/modules/net_lb_proxy_int/health-checks-https.tfvars b/tests/modules/net_lb_proxy_int/health-checks-https.tfvars new file mode 100644 index 000000000..31197e1b7 --- /dev/null +++ b/tests/modules/net_lb_proxy_int/health-checks-https.tfvars @@ -0,0 +1,11 @@ +health_check_config = { + https = { + host = "https_host" + port = 4123 + port_name = "https_port_name" + port_specification = "USE_FIXED_PORT" # USE_FIXED_PORT USE_NAMED_PORT USE_SERVING_PORT + proxy_header = "PROXY_V1" + request_path = "https_request_path" + response = "https_response" + } +} diff --git a/tests/modules/net_lb_proxy_int/health-checks-https.yaml b/tests/modules/net_lb_proxy_int/health-checks-https.yaml new file mode 100644 index 000000000..63c5c8bf6 --- /dev/null +++ b/tests/modules/net_lb_proxy_int/health-checks-https.yaml @@ -0,0 +1,40 @@ +# Copyright 2025 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. + +values: + google_compute_region_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: + - host: https_host + port: 4123 + port_name: https_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request_path: https_request_path + response: https_response + name: hc-test-0 + project: my-project + ssl_health_check: [] + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_region_health_check: 1 diff --git a/tests/modules/net_lb_proxy_int/health-checks-ssl.tfvars b/tests/modules/net_lb_proxy_int/health-checks-ssl.tfvars new file mode 100644 index 000000000..9e2daa4dc --- /dev/null +++ b/tests/modules/net_lb_proxy_int/health-checks-ssl.tfvars @@ -0,0 +1,10 @@ +health_check_config = { + ssl = { + port = 6123 + port_name = "ssl_port_name" + port_specification = "USE_FIXED_PORT" + proxy_header = "PROXY_V1" + request = "ssl_request" + response = "ssl_response" + } +} diff --git a/tests/modules/net_lb_proxy_int/health-checks-ssl.yaml b/tests/modules/net_lb_proxy_int/health-checks-ssl.yaml new file mode 100644 index 000000000..0b1f3e56b --- /dev/null +++ b/tests/modules/net_lb_proxy_int/health-checks-ssl.yaml @@ -0,0 +1,39 @@ +# Copyright 2025 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. + +values: + google_compute_region_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: hc-test-0 + project: my-project + ssl_health_check: + - port: 6123 + port_name: ssl_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request: ssl_request + response: ssl_response + tcp_health_check: [] + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_region_health_check: 1 diff --git a/tests/modules/net_lb_proxy_int/health-checks-tcp.tfvars b/tests/modules/net_lb_proxy_int/health-checks-tcp.tfvars new file mode 100644 index 000000000..6dc7feca7 --- /dev/null +++ b/tests/modules/net_lb_proxy_int/health-checks-tcp.tfvars @@ -0,0 +1,10 @@ +health_check_config = { + tcp = { + port = 5123 + port_name = "tcp_port_name" + port_specification = "USE_FIXED_PORT" + proxy_header = "PROXY_V1" + request = "tcp_request" + response = "tcp_response" + } +} diff --git a/tests/modules/net_lb_proxy_int/health-checks-tcp.yaml b/tests/modules/net_lb_proxy_int/health-checks-tcp.yaml new file mode 100644 index 000000000..32937c910 --- /dev/null +++ b/tests/modules/net_lb_proxy_int/health-checks-tcp.yaml @@ -0,0 +1,39 @@ +# Copyright 2025 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. + +values: + google_compute_region_health_check.default[0]: + check_interval_sec: 5 + description: Terraform managed. + grpc_health_check: [] + grpc_tls_health_check: [] + healthy_threshold: 2 + http2_health_check: [] + http_health_check: [] + https_health_check: [] + name: hc-test-0 + project: my-project + ssl_health_check: [] + tcp_health_check: + - port: 5123 + port_name: tcp_port_name + port_specification: USE_FIXED_PORT + proxy_header: PROXY_V1 + request: tcp_request + response: tcp_response + timeout_sec: 5 + timeouts: null + unhealthy_threshold: 2 +counts: + google_compute_region_health_check: 1 diff --git a/tests/modules/net_lb_proxy_int/tftest.yaml b/tests/modules/net_lb_proxy_int/tftest.yaml new file mode 100644 index 000000000..6e415fe09 --- /dev/null +++ b/tests/modules/net_lb_proxy_int/tftest.yaml @@ -0,0 +1,24 @@ +# Copyright 2023 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. + +module: modules/net-lb-proxy-int +common_tfvars: +- common.tfvars +tests: + health-checks-grpc: + health-checks-http: + health-checks-http2: + health-checks-https: + health-checks-ssl: + health-checks-tcp: