terraform-aws-gitlab-runner
terraform-aws-gitlab-runner copied to clipboard
Fix: S3 cache creation conflicts
Description
When using this terraform to create GitLab Runners in AWS, I ran into issues with creating the S3 cache bucket using the cache module. The issues were around conflicting conditional operations currently in progress, and they happened after repeated runs. I received the follow errors:
Error: error updating S3 Bucket (<account id>-gitlab-runner-cache) tags: error setting resource tags (<account id>-gitlab-runner-cache): OperationAborted: A conflicting conditional operation is currently in progress against this resource. Please try again.
Error: error putting S3 server side encryption configuration: OperationAborted: A conflicting conditional operation is currently in progress against this resource. Please try again.
Each time the status code was 409. I did some research and came across this issue with the AWS Terraform provider: https://github.com/hashicorp/terraform-provider-aws/issues/7628
The workaround suggested there was to add depends_on to some of the S3 resources. I made this change and now the S3 cache bucket is able to be created successfully.
Migrations required
NO
Verification
I ran the terraform from my fork successfully in my AWS account; the cache bucket was created successfully without any conflicting operation errors.
Documentation
N/A
Sorry missed the PR, will have look in the next days
Can you run a rebase with develop please
@npalm Certainly. Rebase is done 😃
According to the linked issue the problem has been solved with 3.67 of the AWS provider.
I think this PR can be closed.
@npalm Any objections to close the PR? Should have been solved with the newer AWS provider.