This article seems to fail to mention why DynamoDB was used, and why a lockfile in S3 can now be used. S3 didn't used to be strongly consistent, it was eventually consistent... ie, one could write a file, and someone else read the file, but get the same version.
How does the backend deal with two people running terraform at exactly the same time.. which one gets the lock? does one overwrite the other?
Thanks a lot for the feedback! Also sorry on the delay. I did initially write a section on why this now works, covering eventual vs strong consistency but decided to remove it. I wanted this to be more of a “how to” as opposed to a deep dive. I will take this onboard however in the future!
Something so simple and so effective. Though dynamodb is cheap, this reduces the additional overhead of needing to manage 1 dynamodb table along with addtional IAM permissions.
Good move!
Glen Ogilvie
This article seems to fail to mention why DynamoDB was used, and why a lockfile in S3 can now be used. S3 didn't used to be strongly consistent, it was eventually consistent... ie, one could write a file, and someone else read the file, but get the same version.
How does the backend deal with two people running terraform at exactly the same time.. which one gets the lock? does one overwrite the other?