* fix(modules): allow disabling logging and configuring optional fields in LB backend services
Replaced 'log_sample_rate' (number) with 'log_config' (object) in all Load Balancer Backend Service modules. This allows explicitly disabling logging ('enable = false') and configuring advanced options like 'optional_mode' and 'optional_fields', resolving infinite plan drift and the inability to disable logging.
Affected modules:
- net-lb-app-ext-regional
- net-lb-app-ext
- net-lb-app-int-cross-region
- net-lb-app-int
- net-lb-ext
- net-lb-int
- net-lb-proxy-int
Added test cases and updated documentation.
Fixes#3914
* style: format variables files with terraform fmt
* docs: add critical linting rule for AI agents to GEMINI.md
* feat: Changes for migrating resources to GLB module
* Updated Readme
* Added support for null description
* Added support for empty string
* Added default optional values
* Changed Readme
* Corrected description according to readme
* Added name and description changes for net-lb-app-ext-regional
* Added name and description changes for net-lb-app-int
* Added name and description changes for net-lb-app-int-cross-region
* Added name and description changes for net-lb-proxy-int
* Added name and description changes for net-lb-ext
* Added name and description changes for net-lb-int
* Changed Readme docs
Load balancers can be configured with IAP-enabled backends.
They can either be configured to use external Identity Providers (IdP)
or to use Cloud Identity. The latter is the default and is used when
the OAuth2 parameters are not specified.
The iap_config parameter in the backend_service_configs variable
already supported the external IdP option, but did not support the
default one.
* Fix the missing locality_lb_policy value and add validation for it
* Added variables, dynamic blocks and validation to support locality_lb_policy/ies
* Formatting
* tfdoc generation
* Fix net-lb-app-ext readme
* Fixes for Ludo, coalesce and brevity
* fmt
* Revert null check due to failing tests
---------
Co-authored-by: Jack Lever <jack@thelevers.com.au>
Co-authored-by: Ludo <ludomagno@google.com>
* updates
- set client_tls_policy as optional
- set subject_alt_names as optional
* update
run cmd ./tools/tfdoc.py modules/net-lb-app-ext to fix linting error
* added disable_default_snat variable
* add an option to disable default snat
* tfdoc readme
* change order of variables
* modify variable to exist within vpc_config and have a null default,
creating a conditional dynamic block to provide backward compatability
* defining disable snat variable in autopilot as it is also an option
* fix conditional
* update readme
* null is implied in optional bool
* update readmes
* expose aws_v4_authentication configuration option
* terraform fmt
* update readme
* use dynamic block and optional for new variable
## 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