Open eitchugo opened 4 months ago
+1, we're also experiencing this. Please fix!
I appear to be having a related issue. When trying to change the load_balancing_scheme of an existing load balancer created via this module from EXTERNAL to EXTERNAL_MANAGED, I receive the following error:
Error: Error when reading or editing BackendService: googleapi: Error 400: The backend_service resource 'projects/xxxxx/global/backendServices/xxxxx' is already being used by 'projects/xxxxx/global/urlMaps/xxxxx', resourceInUseByAnotherResource
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
TL;DR
I'm using terragrunt for implementing this module and I have a use case on creating a custom url_map resource with multiple host_rules and path_matchers. I'm getting a circular dependency error because to create the url map I need the backend service from this module, but to create the LB with a custom url_map I need the custom url_map already created.
So, implementing the custom url_map inside a module here would be great.
Terraform Resources
Detailed design
I did a quick and dirty proof of concept: https://github.com/eitchugo/terraform-google-lb-http/commit/0ad4b3d7e9480a3a3febfab66e3c7b640c699541
It's working, but not complete.
I want your opinion if it's OK to create a Pull Request and work on this. What I have on my mind:
The url_map would be a sub-module that can be referenced on the main and other sub-modules. Any references to it would be replaced with
module.url_map.output.self_link
The default url_map would stay the same, and a new variable would be created:
create_url_map_resource
. If this variable exists, it will replace the default url_map for this custom one (example in my code). This makes it a non-breaking change.Additional information
Related issue: https://github.com/terraform-google-modules/terraform-google-lb-http/issues/245