Commit Graph

19 Commits

Author SHA1 Message Date
Ludovico Magnocavallo
bf9ccb7547 Allowing disabling logging and configuring optional fields in LB backend services (#3940)
* 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
2026-05-07 07:07:58 +00:00
Julio Castillo
bc5b203a8f Add toggle to tfdoc to remove type hints (#3842)
* Add toggle to tfdoc to remove type hints

* Update all readmes

* Fix python formatting
2026-04-08 11:08:18 +00:00
Ludovico Magnocavallo
a4eb4d24fd Compute VM module refactor (#3805)
* add ad for compute-vm refactor

* Exclue nic_type from validated fields, add split of main.tf and template.tf

* boot disk

* fix examples and fixtures

* attached disks

* fix further examples and module-level tests

* remove extra file

* fix mig examples

* finish refactoring variables

* align fast and other modules

* refactor(compute-vm): align examples and ADR with the newly implemented interface

This commit addresses the remaining references of the `instance_type` and `confidential_compute` parameters in the testing environment and updates the ADR.

* feat(compute-vm): add network_performance_config to instance and templates

This change implements the usage of the `network_performance_tier` variable we added earlier into the actual Terraform resources.

---------

Co-authored-by: Wiktor Niesiobędzki <wiktorn@google.com>
2026-03-26 11:31:40 +00:00
Suryansh Singhal
f94033f098 improve configurability and resource references for internal ALB (#3654)
* refactor(net-lb-app-ext): improve configurability and resource references

- Allow overriding names for backend buckets and instance groups
- Add optional per-group description with default value
- Use self_link for instance group backend references
- Fix HTTP proxy name to use http_proxy_config

* reverted the instance group reference in backend service back to id instead of self link

* updated all the lb modules for unmanaged instance groups to have flexible names and proper refactorization of http_proxy_cofig in each module

* removed the description variable

* updated the readme.md for the net-lb-app-ext-regional module

* fixed the linting error for the change in versions.tf

---------

Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2026-01-23 15:35:52 +00:00
Ayush Gupta
4035b35af3 Allow custom names and descriptions for load balancer components (#3223)
* 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
2025-07-18 08:09:50 +02:00
Ludovico Magnocavallo
9148e76087 Add support for project-level log sinks to FAST stage 0 (#2893)
* Fix ipv6 and align loadbalancer address types

* Release v37.3.0

* add support for project-level log sinks to stage 0

---------

Co-authored-by: Wiktor Niesiobędzki <wiktorn@google.com>
2025-02-14 11:58:18 +01:00
Cooper van Wijck
3cf8889967 Add name overrides for Internal and External Load Balancers (#2420)
* Add override_name optional variable

* Add override name optional variable

* Allow override for each forwarding rule

* Add optional override_name variable to forwarding_rules_config

* Remove duplicate (unused) variable override_name

* Add optional override_name variable for network peering

* Add optional override_name variable for network peering

* Formatting

* Update VPN tunnel interface name handling for override

* Update bgp peer handling for override

* Added renaming for both sides of peering

* Fix precondition

* Remove spurious folders

* Apply suggestions to peering module

* Use coalesce and name (instead of override_name)

* remove unneeded null

* Revert windows style slashes in readme

* Fix more null checks

* Fix unneeded null checks in net-lb-int

* Change override_name back to name in the rest of the locations, bgppeer, tunnel and interface names

* Fix linter

* Update READMEs

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: unknown <jack@JACK-PC.lfn.arpa>
Co-authored-by: jacklever-hub24 <jack.lever@hub24.com.au>
Co-authored-by: Julio Castillo <jccb@google.com>
2024-08-16 08:45:29 +02:00
Wiktor Niesiobędzki
ea564df648 Add documentation for load balancer changes (#2336)
---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2024-06-03 06:47:48 +00:00
Julio Castillo
3af7e257d2 Add tflint to pipelines (#2220)
* Fix terraform_deprecated_index

https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.5.0/docs/rules/terraform_deprecated_index.md

* Fix terraform_deprecated_interpolation

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.5.0/docs/rules/terraform_deprecated_interpolation.md

* Fix more indexing

* Remove unused variable

* Enable TFLint for modules

* Add tflint config file

* Fix chdir

* Lint modules

* TFLint fixes

* TFLint

* Fixes binauthz README

* Fixes DNS response policy tests. Restores MIG outputs.

* Fixes other DNS response policy tests.

* Update tests for fast 2-e

* Moar fixed tests

---------

Co-authored-by: Simone Ruffilli <sruffilli@google.com>
2024-04-17 10:23:48 +02:00
Wiktor Niesiobędzki
af41e0fe38 Use fixtures in net-lb-ext 2024-01-06 17:09:49 +01:00
Ludovico Magnocavallo
537237edd6 Fix health check autocreation and id output in passthrough LB modules (#1928)
* fix health check autocreation and id output

* fix health check exclusion
2023-12-13 23:39:55 +00:00
dibaskar-google
c65e242685 net_lb_ext module e2e and example testing changes (#1909)
E2E tests for net_lb_ext
2023-12-08 10:04:07 +01:00
Luca Prete
019cca735d net-lb-ext: add option to set IPv6 subnetwork for IPv6 external fw rules 2023-10-24 13:37:33 +00:00
Luca Prete
a23b3d62ae net-lb-ext: add support for multiple forwarding rules (IPs) and dual-stack (IPv4/IPv6) 2023-10-21 18:19:18 +02:00
Wiktor Niesiobędzki
c21fa4558f 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
2023-10-18 08:11:32 +02:00
Ludovico Magnocavallo
df5daab6cc Allow using no service account in compute-vm (#1692)
* module and tests

* align blueprints

* tfdoc

* remove stale variables

* fix blueprint

* variable description
2023-09-19 16:56:51 +00:00
Miren Esnaola
f49515495c Fix in validation of healthchecks variable 2023-07-31 10:23:32 +02:00
Ludovico Magnocavallo
31f7a9ecca allow external editing of group instances in lb modules (#1486) 2023-06-30 17:34:09 +00:00
Ludovico Magnocavallo
638841c8d1 Rename network load balancer modules (#1466)
* update LB modules to new names

* update LB modules names

* update test paths
2023-06-26 07:50:10 +00:00