Remove incompatible balancing_mode (#1769)

## net-lb-int
* Fix error on apply of example:
```
Error creating RegionBackendService: googleapi: Error 400: Invalid value for field 'resource.backends[0].balancingMode': 'UTILIZATION'. Balancing mode must be CONNECTION for an INTERNAL backend service., invalid
```
* remove unused `balancing_mode` variable, as only one value is possible anyhow

## net-lb-ext
* update in the `backends` description

## net-lb-proxy-int
* update in the `backends` description

## net-lb-app-int
* added validation of `balancing_mode`
* fixed other validations

## net-lb-app-ext
* added validation of `balancing_mode`
* fixed other validations
* removed validation for `locality_lb_policy` as this variable is not used in this module

Closes: #1767
This commit is contained in:
Wiktor Niesiobędzki
2023-10-18 08:11:32 +02:00
committed by GitHub
parent 6c48512f7e
commit c21fa4558f
10 changed files with 71 additions and 68 deletions

View File

@@ -68,7 +68,7 @@ variable "backend_service_config" {
for b in var.backend_service_config.backends : contains(
["CONNECTION", "UTILIZATION"], coalesce(b.balancing_mode, "CONNECTION")
)])
error_message = "When specified balancing mode needs to be 'CONNECTION' or 'UTILIZATION'."
error_message = "When specified, balancing mode needs to be 'CONNECTION' or 'UTILIZATION'."
}
}