Make max utilization optional to support Serverless NEG backends
Similar to what we had to do with health checks to support Internet NEGs, it would appear that serverless NEGs cannot have a max util set.
Error: Error creating BackendService: googleapi: Error 400: Invalid value for field 'resource.backends[0].maxUtilization': '1.0'. Max utilization is not supported for Serverless network endpoint groups., invalid
Since this module uses the Google terraform provider's google_compute_backend_service resource, I believe this will get fixed when this issue is fixed: https://github.com/hashicorp/terraform-provider-google/issues/6876
This should now be unblocked as per the latest beta provider https://github.com/hashicorp/terraform-provider-google-beta/releases/tag/v3.37.0
This seems unblocked now for serverless NEGs. You can set the field to null.
I'm in the process of creating a submodule specifically for creating LB for Serverless NEGs. It will not have the unsupported fields such as this. Sadly, some fields are disallowed with an error (as above) and some are ignored (noop). I'm working on collecting an exhaustive list internally and will be releasing a submodule.