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

Write CloudFront Access Logs to Single S3 Bucket #8

Closed
dumrauf opened this issue Jun 18, 2018 · 3 comments
Closed

Write CloudFront Access Logs to Single S3 Bucket #8

dumrauf opened this issue Jun 18, 2018 · 3 comments
Assignees

Comments

@dumrauf
Copy link
Owner

dumrauf commented Jun 18, 2018

Having CloudFront write its access logs to a bucket has been introduced in #5.

At the moment, a new S3 bucket gets created for every serverless static website instance created by the Terraform module. Ironically, the CloudFront access logs for subdomains are already prefixed within the S3 bucket and hence put in their corresponding "directory". This forced creation of a new S3 logging bucket doesn't really seem to be necessary.

It would be nice to specify the S3 bucket used for CloudFront access logging and hence have all logs in one central S3 bucket. By definition of subdomains and domains, there shouldn't be any clashes.

@dumrauf dumrauf self-assigned this Jun 18, 2018
dumrauf pushed a commit that referenced this issue Jun 19, 2018
dumrauf pushed a commit that referenced this issue Jun 19, 2018
@dumrauf
Copy link
Owner Author

dumrauf commented Jun 19, 2018

Closing this for now until a better solution for creating optional resources is available

@dumrauf dumrauf closed this as completed Jun 19, 2018
@dumrauf
Copy link
Owner Author

dumrauf commented Jun 20, 2018

As long as hashicorp/hil#50 has not been fixed, there are essentially two options to solve this:

  1. Accept the fact that a logging bucket always gets created (even though it's not used and not requested in the input variables)
  2. Make the log_bucket_domain_name a mandatory input but provide an additional Terraform module to easily create a logging bucket

As of now, it seems like 2 is the best option.

dumrauf pushed a commit that referenced this issue Jun 20, 2018
@dumrauf
Copy link
Owner Author

dumrauf commented Jun 22, 2018

Reopening in order to implement solution 2 described above.

@dumrauf dumrauf reopened this Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant