Hello,
I’m using terraform to create the infrastructure of a project where terraform is executed in a container in AWS CodeBuild.
When I run terraform in my development machine, I see the following message:
Acquiring state lock. This may take a few moments…
However, when terraform is executed in AWS CodeBuild, I don’t see such a message and, in fact, I’ve seen two parallel executions happening without any of them failing because of not being able to get the lock (one eventually failed because a resource already existed).
I haven’t been able to reproduce the problem running a container locally from the same base image using the same IAM role (i.e. in this case the lock is acquired). I’ve also tried with terraform 0.13.4 and 0.14.4 just in case to no avail.
What could be the reason for terraform not to acquire the lock while the same container in my development machine does?
Best regards,
Javier