terraform-aws-gitlab-runner icon indicating copy to clipboard operation
terraform-aws-gitlab-runner copied to clipboard

Fix: S3 cache creation conflicts

Open beekeep opened this issue 4 years ago • 3 comments
trafficstars

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

beekeep avatar May 28 '21 13:05 beekeep

Sorry missed the PR, will have look in the next days

npalm avatar Jun 17 '21 20:06 npalm

Can you run a rebase with develop please

npalm avatar Apr 09 '22 19:04 npalm

@npalm Certainly. Rebase is done 😃

beekeep avatar Apr 11 '22 13:04 beekeep

According to the linked issue the problem has been solved with 3.67 of the AWS provider.

I think this PR can be closed.

kayman-mk avatar Dec 01 '22 10:12 kayman-mk

@npalm Any objections to close the PR? Should have been solved with the newer AWS provider.

kayman-mk avatar Jan 01 '23 15:01 kayman-mk