Hello everyone, I have a terraform script that creates 2 buckets. One for storing objects, and the other one for logging access to that bucket.
Basically I’m creating these resources per bucket:
Every time I run the terraform script to create the bucket, I’m getting conflicting errors like this:
Error: creating S3 Bucket (bucket-name) Versioning: operation error S3: PutBucketVersioning, https response error StatusCode: 409, RequestID:, HostID: , api error OperationAborted: A conflicting conditional operation is currently in progress against this resource. Please try again.
│
│ with module.s3_bucket.aws_s3_bucket_versioning.s3-bucket,
│ on -s3/main.tf line 158, in resource "aws_s3_bucket_versioning" "s3-bucket":
│ 158: resource "aws_s3_bucket_versioning" "s3-bucket" {
It’s not always on the same resource, I’ve seen it happen in the object s3 bucket, when creating policies, versioning, keys, and so on. And sometimes it also happens when creating the access-logs bucket.
If I run the script again, it runs successful.
I’ve tried adding depends on all over, but I keep getting the same error. Any ideas on what I can do to solve this?
Ahhh. Thanks so much. I’ll try to use the GitHub version to test it.
Actually, any ideas how to test the GitHub version?
I have never done this so not sure what the process is.