provider-terraform
provider-terraform copied to clipboard
Default poll interval of 1m seems excessively short
What happened?
Reconciliation is running with the default poll interval of 1 minute, which means that (theoretically) every terraform Workspace gets reconciled once every 60 seconds.
In reality since the provider is single-threaded, and terraform init alone can take 10 seconds or more, the provider can quickly get overwhelmed with work and the handling of new Workspaces gets delayed because the provider is spending so much time reconciling existing workspaces.
Considering how much time it takes a typical terraform CLI comand to run, and the relatively small likelihood that things will change within a minute, I think it's more reasonable to have a 5 minute or 10 minute default poll interval which will give the provider time to handle new Workspaces as they are created while still reconciling existing workspaces at a reasonable interval.
I'm open to discussion on what the default interval should be, I just think 1 minute is far too short.
How can we reproduce it?
Create a 10-20 workspaces that have reasonable workloads and observe the provider slow down as it tries to service all of the requests and reconcile every minute.
What environment did it happen in?
Crossplane version: 1.8.1