diff --git a/modules/net-ilb/README.md b/modules/net-ilb/README.md
index 5573e525..00a17d1d 100644
--- a/modules/net-ilb/README.md
+++ b/modules/net-ilb/README.md
@@ -179,7 +179,7 @@ module "ilb" {
| [region](variables.tf#L206) | GCP region. | string
| ✓ | |
| [vpc_config](variables.tf#L217) | VPC-level configuration. | object({…})
| ✓ | |
| [address](variables.tf#L17) | Optional IP address used for the forwarding rule. | string
| | null
|
-| [backend_service_config](variables.tf#L23) | Backend service level configuration. | object({…})
| | {}
|
+| [backend_service_config](variables.tf#L23) | Backend service level configuration. | object({…})
| | {}
|
| [backends](variables.tf#L56) | Load balancer backends, balancing mode is one of 'CONNECTION' or 'UTILIZATION'. | list(object({…}))
| | []
|
| [description](variables.tf#L75) | Optional description used for resources. | string
| | "Terraform managed."
|
| [global_access](variables.tf#L81) | Global access, defaults to false if not set. | bool
| | null
|
diff --git a/modules/net-ilb/main.tf b/modules/net-ilb/main.tf
index 177a7cf5..90a97fed 100644
--- a/modules/net-ilb/main.tf
+++ b/modules/net-ilb/main.tf
@@ -80,11 +80,7 @@ resource "google_compute_region_backend_service" "default" {
: null
)
idle_timeout_sec = local.bs_conntrack.idle_timeout_sec
- tracking_mode = (
- local.bs_conntrack.tracking_mode != null
- ? local.bs_conntrack.tracking_mode
- : null
- )
+ tracking_mode = try(local.bs_conntrack.track_per_session ? "PER_SESSION" : "PER_CONNECTION", null)
}
}
diff --git a/modules/net-ilb/variables.tf b/modules/net-ilb/variables.tf
index 4b942edc..538d10af 100644
--- a/modules/net-ilb/variables.tf
+++ b/modules/net-ilb/variables.tf
@@ -27,7 +27,7 @@ variable "backend_service_config" {
connection_tracking = optional(object({
idle_timeout_sec = optional(number)
persist_conn_on_unhealthy = optional(string)
- tracking_mode = optional(string)
+ track_per_session = optional(true)
}))
enable_subsetting = optional(bool)
failover_config = optional(object({