Whole-provider-process synchronization

Would like to know more about whole-provider-process sync as mentioned here

I’m running into an API limitation requiring me to set parallelism to 1.

@apparentlymart is this something you could point me in the right direction for?

Hi @rickhlx!

It’s been a while since I wrote that comment, but I believe I was thinking of a generic synchronization primitive rather than anything Terraform-specific. For example, locking a Mutex for the duration of each operation would ensure that within that single provider process only one operation can be in progress at the same time, which would create a similar effect to setting the parallelism option to 1.

That mutex could be kept inside the object returned from Configure that is passed in as meta to resource type arguments, for example. That would then make it available to all resource type implementations in the provider.

Thanks @apparentlymart!

This was very helpful, ended up using a version of how the AWS provider implements Mutex locks. Linking some

My provider is working great now.

Thanks,