diff --git a/modules/backend/README.md b/modules/backend/README.md index d7aa633a..0bc78add 100644 --- a/modules/backend/README.md +++ b/modules/backend/README.md @@ -19,7 +19,7 @@ This module creates `google_compute_backend_service` resource and its dependenci | firewall\_projects | Names of the projects to create firewall rules in | `list(string)` |
[| no | | groups | The list of backend instance group which serves the traffic. |
"default"
]
list(object({
group = string
description = optional(string)
balancing_mode = optional(string)
capacity_scaler = optional(number)
max_connections = optional(number)
max_connections_per_instance = optional(number)
max_connections_per_endpoint = optional(number)
max_rate = optional(number)
max_rate_per_instance = optional(number)
max_rate_per_endpoint = optional(number)
max_utilization = optional(number)
})) | `[]` | no |
| health\_check | Input for creating HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. A health check must be specified unless the backend service uses an internet or serverless NEG as a backend. | object({
host = optional(string, null)
request_path = optional(string, null)
request = optional(string, null)
response = optional(string, null)
port = optional(number, null)
port_name = optional(string, null)
proxy_header = optional(string, null)
port_specification = optional(string, null)
protocol = optional(string, null)
check_interval_sec = optional(number, 5)
timeout_sec = optional(number, 5)
healthy_threshold = optional(number, 2)
unhealthy_threshold = optional(number, 2)
logging = optional(bool, false)
}) | `null` | no |
-| host\_path\_mappings | The list of host/path for which traffic could be sent to the backend service | `list(object({ host : string, path : string }))` | [| no | +| host\_path\_mappings | The list of host/path for which traffic could be sent to the backend service |
{
"host": "*",
"path": "/*"
}
]
list(object({
host = string
path = string
})) | [| no | | iap\_config | Settings for enabling Cloud Identity Aware Proxy Structure. |
{
"host": "*",
"path": "/*"
}
]
object({
enable = bool
oauth2_client_id = optional(string)
oauth2_client_secret = optional(string)
}) | {
"enable": false
} | no |
| load\_balancing\_scheme | Load balancing scheme type (EXTERNAL for classic external load balancer, EXTERNAL\_MANAGED for Envoy-based load balancer, and INTERNAL\_SELF\_MANAGED for traffic director). | `string` | `"EXTERNAL_MANAGED"` | no |
| locality\_lb\_policy | The load balancing algorithm used within the scope of the locality. | `string` | `null` | no |
diff --git a/modules/backend/main.tf b/modules/backend/main.tf
index ee1f7872..86063dc7 100644
--- a/modules/backend/main.tf
+++ b/modules/backend/main.tf
@@ -169,22 +169,22 @@ resource "google_compute_region_network_endpoint_group" "serverless_negs" {
dynamic "cloud_run" {
for_each = each.value.type == "cloud-run" ? [1] : []
content {
- service = each.value.service.name
+ service = each.value.service_name
}
}
dynamic "cloud_function" {
for_each = each.value.type == "cloud-function" ? [1] : []
content {
- function = each.value.service.name
+ function = each.value.service_name
}
}
dynamic "app_engine" {
for_each = each.value.type == "app-engine" ? [1] : []
content {
- service = each.value.service.name
- version = each.value.service.version
+ service = each.value.service_name
+ version = each.value.service_version
}
}
diff --git a/modules/backend/metadata.yaml b/modules/backend/metadata.yaml
index 56a6300e..f6ba6417 100644
--- a/modules/backend/metadata.yaml
+++ b/modules/backend/metadata.yaml
@@ -151,7 +151,7 @@ spec:
}))
defaultValue: []
connections:
- source:
+ - source:
source: github.com/terraform-google-modules/terraform-google-vm//modules/mig
version: ~> 12.0
spec:
@@ -167,11 +167,11 @@ spec:
}))
defaultValue: []
connections:
- source:
+ - source:
source: github.com/GoogleCloudPlatform/terraform-google-cloud-run//modules/v2
- version: ~> 0.12
+ version: ~> 0.13
spec:
- outputExpr: '{"region": location, "service_name": service_name, "type": "cloud-run"}'
+ outputExpr: '{"region": location, "service_name": service_name, "type": "cloud-run", "service_version": ""}'
- name: iap_config
description: Settings for enabling Cloud Identity Aware Proxy Structure.
varType: |-
@@ -258,7 +258,11 @@ spec:
varType: string
- name: host_path_mappings
description: The list of host/path for which traffic could be sent to the backend service
- varType: "list(object({ host : string, path : string }))"
+ varType: |-
+ list(object({
+ host = string
+ path = string
+ }))
defaultValue:
- host: "*"
path: /*
@@ -287,8 +291,8 @@ spec:
- list
- - object
- host: string
- - path: string
- - backend_service: string
+ path: string
+ backend_service: string
requirements:
roles:
- level: Project
diff --git a/modules/backend/variables.tf b/modules/backend/variables.tf
index a4fcf028..28166182 100644
--- a/modules/backend/variables.tf
+++ b/modules/backend/variables.tf
@@ -239,8 +239,11 @@ variable "security_policy" {
variable "host_path_mappings" {
description = "The list of host/path for which traffic could be sent to the backend service"
- type = list(object({ host : string, path : string }))
- default = [{ host : "*", path : "/*" }]
+ type = list(object({
+ host = string
+ path = string
+ }))
+ default = [{ host : "*", path : "/*" }]
}
variable "firewall_networks" {
diff --git a/modules/frontend/README.md b/modules/frontend/README.md
index 2b8c5545..0e43a1dd 100644
--- a/modules/frontend/README.md
+++ b/modules/frontend/README.md
@@ -33,7 +33,7 @@ This module creates `HTTP(S) forwarding rule` and its dependencies. This modules
| ssl | Set to `true` to enable SSL support. If `true` then at least one of these are required: 1) `ssl_certificates` OR 2) `create_ssl_certificate` set to `true` and `private_key/certificate` OR 3) `managed_ssl_certificate_domains`, OR 4) `certificate_map` | `bool` | `false` | no |
| ssl\_certificates | SSL cert self\_link list. Requires `ssl` to be set to `true` | `list(string)` | `[]` | no |
| ssl\_policy | Selfink to SSL Policy | `string` | `null` | no |
-| url\_map\_input | List of host, path and backend service for creating url\_map | list(object({
host : string
path : string
backend_service : string
})) | `[]` | no |
+| url\_map\_input | List of host, path and backend service for creating url\_map | list(object({
host = string
path = string
backend_service = string
})) | `[]` | no |
| url\_map\_resource\_uri | The url\_map resource to use. Default is to send all traffic to first backend. | `string` | `null` | no |
## Outputs
diff --git a/modules/frontend/metadata.yaml b/modules/frontend/metadata.yaml
index 6b4b06fc..daf223ee 100644
--- a/modules/frontend/metadata.yaml
+++ b/modules/frontend/metadata.yaml
@@ -102,17 +102,17 @@ spec:
description: List of host, path and backend service for creating url_map
varType: |-
list(object({
- host : string
- path : string
- backend_service : string
+ host = string
+ path = string
+ backend_service = string
}))
defaultValue: []
connections:
- source:
- source: github.com/GoogleCloudPlatform/terraform-google-lb-http//modules/backend
- version: ">= 12.0"
- spec:
- outputExpr: backend_service_info
+ - source:
+ source: github.com/terraform-google-modules/terraform-google-lb-http//modules/backend
+ version: ~> 12.0
+ spec:
+ outputExpr: backend_service_info
- name: url_map_resource_uri
description: The url_map resource to use. Default is to send all traffic to first backend.
varType: string
diff --git a/modules/frontend/variables.tf b/modules/frontend/variables.tf
index 48c71990..be93c406 100644
--- a/modules/frontend/variables.tf
+++ b/modules/frontend/variables.tf
@@ -64,9 +64,9 @@ variable "create_url_map" {
variable "url_map_input" {
description = "List of host, path and backend service for creating url_map"
type = list(object({
- host : string
- path : string
- backend_service : string
+ host = string
+ path = string
+ backend_service = string
}))
default = []
}