Closed Stono closed 4 years ago
reading into this more from a similar issue (https://github.com/terraform-providers/terraform-provider-google/issues/4689), it appears that batching is limited by parallelism
, which defaults to 10. I'm able to get my plan time down by setting this to 100, but that feels like a strange workaround and will likely cause me to hit other api rate limits.
We actually also batch calls to get the project services - this might actually be due to the fact that our batches are created on intervals, and it defaults to 10 seconds. We have a parameter for setting this interval here in the provider configuration:
https://www.terraform.io/docs/providers/google/guides/provider_reference.html#send_after - could you try seeing if reducing this interval helps your plan time?
We should probably also look into reducing this default time, given the initial limit on number of concurrent requests is pretty low.
Hey,
I set the timer to 3 seconds, combined with setting parallelism to 100 and my plan time is now 1m 33s
, whereas on the old provider it was 3m 12s
, so it's actually faster :-)
Thanks for your help!
Glad to hear it :) I'll go ahead and close the issue now!
I'm going to lock this issue because it has been closed for 30 days β³. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error π€ π , please reach out to my human friends π hashibot-feedback@hashicorp.com. Thanks!
Community Note
Terraform Version
0.12.18, with 3.3.0 google plugin
Affected Resource(s)
google_project_service
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
google_project_service
implementation to be as fast asgoogle_project_services
was.Actual Behavior
Since
google_project_services
was deprecated, we now have to declare agoogle_project_services
for each api we enable in terraform. We have some 40 apis used across 15 different projects, as a result aterraform plan
now takes, absolutely ages.I can only presume that previously,
google_project_services
retrieved the list of all enabled apis for the project in one call, whereas now that's happening for eachgoogle_project_service
.This is that bad, we're likely going to stop using terraform to track
google_project_service
, which isn't great - as we'd like everything in git as code.Steps to Reproduce
terraform apply
Important Factoids
References
0000