Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialise origin bucket modifications #136

Merged
merged 3 commits into from
Mar 10, 2021

Conversation

alexjurkiewicz
Copy link
Contributor

@alexjurkiewicz alexjurkiewicz commented Mar 8, 2021

You can't modify an S3 bucket's policy & public access block at the same
time, AWS API will complain:

OperationAborted: A conflicting conditional operation is currently in progress against this resource

This error can appear during both deploy and destroy for the module.

Serialise operations to the origin bucket so we don't run into this
error. The suggested fix is from

hashicorp/terraform-provider-aws#7628

references

Fixes #104

You can't modify an S3 bucket's policy & public access block at the same
time, AWS API will complain:

OperationAborted: A conflicting conditional operation is currently in progress against this resource

Serialise operations to the origin bucket so we don't run into this
error. The suggested fix is from

hashicorp/terraform-provider-aws#7628
@alexjurkiewicz alexjurkiewicz requested review from a team as code owners March 8, 2021 02:33
@alexjurkiewicz alexjurkiewicz requested a review from a team as a code owner March 8, 2021 02:33
@alexjurkiewicz alexjurkiewicz requested review from Gowiem and joe-niland and removed request for a team March 8, 2021 02:33
@joe-niland
Copy link
Member

/test all

main.tf Outdated
@@ -94,7 +94,7 @@ data "template_file" "default" {

resource "aws_s3_bucket_policy" "default" {
count = ! local.using_existing_origin || var.override_origin_bucket_policy ? 1 : 0
bucket = local.bucket
bucket = aws_s3_bucket.origin.bucket
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bucket = aws_s3_bucket.origin.bucket
bucket = join("", aws_s3_bucket.origin.*.bucket)

Copy link
Member

@joe-niland joe-niland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexjurkiewicz just a small typo to fix

@alexjurkiewicz
Copy link
Contributor Author

alexjurkiewicz commented Mar 10, 2021 via email

@mergify mergify bot dismissed joe-niland’s stale review March 10, 2021 02:04

This Pull Request has been updated, so we're dismissing all reviews.

@joe-niland
Copy link
Member

/test bats

@joe-niland
Copy link
Member

/test readme

@joe-niland
Copy link
Member

/test terratest

@joe-niland joe-niland merged commit 7453694 into cloudposse:master Mar 10, 2021
@joe-niland
Copy link
Member

Thank you @alexjurkiewicz !

@Nuru Nuru mentioned this pull request May 12, 2021
@alexjurkiewicz alexjurkiewicz deleted the bucket-ordering branch June 30, 2021 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Module dependency issue
3 participants