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

Added account id to bucket name to ensure uniqueness #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nealbrown
Copy link

@nealbrown nealbrown commented Feb 12, 2023

Using the default resource prefix of aws-cis yields a bucket name of aws-cis-audit-logs which appears to already exist.

Insert the account id into the bucket name to yield a unique name.

Original error, ideally the AWS API would give a better response for an existing bucket but I see the security issue there:
Error: creating Amazon S3 (Simple Storage) Bucket (aws-cis-audit-logs): AuthorizationHeaderMalformed: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'eu-central-1' │ status code: 400, request id: AENNHNACK4Z82XND, host id: +5V93mvxTjXkRzWtI34PHJj5alivNUxyzFloJMKQAl2CCmDFdVwkP1M4qYDYJIGl3q3c2bhB8tw= │ │ with aws_s3_bucket.audit[0], │ on s3.tf line 101, in resource "aws_s3_bucket" "audit": │ 101: resource "aws_s3_bucket" "audit" { │ ╵

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.

1 participant