I'm having trouble to know how to properly work with Terraform in a distributed team.
My team is using using git to work with terraform "*tf" files, using shared AWS accounts.
We keep a shared distributed Terraform state in an AWS S3 bucket and each team member is working on its own terraform resource/s on its own branch. For example some member add some resource to an API-gateway while another add a lambda.
The different git branches with different terraform *tf are not synchronized/merged for 1-3 days, so teams members do not see "*tf" resources created by other team members in the mean time, just the shared state and the local/non-shared resource declarations.
With this scenario Terraform is constantly breaking with "terraform apply" being locked while trying to free resources created by someone else.
What is the correct flow / procedure to sync shared state in this scenario?
I guess creating "micro-shared-states" is the easy solution, but then I'm wondering what's the final purpose of a shared state, other than being able to recreate all the infrastructure in a single "terraform apply" (vs multiple "terraform apply" to multiple subdirectories). Wouldn't it be better to keep everything on git and let git share the state? Is there anything wrong (any anti-pattern) with the idea of git-distributed micro-states?