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

Support for Brotli compression on Cloudfront #15172

Closed
edhgoose opened this issue Sep 16, 2020 · 4 comments
Closed

Support for Brotli compression on Cloudfront #15172

edhgoose opened this issue Sep 16, 2020 · 4 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/cloudfront Issues and PRs that pertain to the cloudfront service.

Comments

@edhgoose
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

AWS have announced support for Brotli on Cloudfront: https://aws.amazon.com/about-aws/whats-new/2020/09/cloudfront-brotli-compression/ which in theory enables smaller file sizes, and is widely supported by Chrome and Firefox.

It would be great to be able to enable this across our CloudFront distributions.

New or Affected Resource(s)

  • aws_cloudfront_distribution

Potential Terraform Configuration

Currently the default_cache_behavior just has compress with a boolean value:

  default_cache_behavior {
    compress = true
}

Perhaps:

  default_cache_behavior {
    compress = ['gzip', 'br']
}

would be better, if possible, to enable users to make a decision on which compression types to support? I'd personally be happy with just compress = true supporting both gzip and br, but I'm not sure if that's universal and would change existing distributions.

References

@edhgoose edhgoose added the enhancement Requests to existing resources that expand the functionality or scope. label Sep 16, 2020
@ghost ghost added the service/cloudfront Issues and PRs that pertain to the cloudfront service. label Sep 16, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Sep 16, 2020
@ewbankkit
Copy link
Contributor

Requires AWS SDK v1.34.21:

Looking at the Working with policies section of the CloudFront Developer Guide, Brotli compression is enabled via an attribute on the Cache Policy object: #14373, #14672.
On the aws_cloudfront_distribution resource, compress would stay as a boolean in the various cache_behavior configuration blocks.

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Sep 16, 2020
@roberth-k
Copy link
Contributor

Now included in #14672 as enable_accept_encoding_brotli.

@ewbankkit
Copy link
Contributor

ewbankkit commented Feb 12, 2021

This has been included in the new aws_cloudfront_cache_policy resource implemented via #17336, to be released in v3.28.0 of the Terraform AWS Provider.

@ghost
Copy link

ghost commented Mar 14, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Mar 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/cloudfront Issues and PRs that pertain to the cloudfront service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants