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

Add PriceClass variable so that it is configurable #19

Closed
wants to merge 11 commits into from

Conversation

andylamp
Copy link
Contributor

@andylamp andylamp commented Jan 26, 2024

Description

This PR adds a price_class variable so that the respective CDN optimization can be set within the scope of the CloudFront distribution being created. Currently this is not supported and its value is hardcoded to some regions (instead of all).

Additionally, it allows the configuration of the cache policy that the distribution will use as this is currently this is not supported.

This PR addresses these limitations and introduces no breaking changes.

Context

Allow users to adjust the following parameters,

  • Price class for their CloudFront distribution,
  • Cache Policy of the created distribution.

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

Copy link
Collaborator

@Tomdango Tomdango left a comment

Choose a reason for hiding this comment

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

LGTM. There's no specific place in the config to place this outside of the root variables to place S3 config, so might be worth some sort of refactor in the future to expose a few more options.

@andylamp
Copy link
Contributor Author

Yes, a refactor might be prudent - this was a non-breaking change that could add this sort of functionality for now. Seems a good compromise for the time being :-).

@Tomdango
Copy link
Collaborator

@andylamp These changes failed to merge due to the histories now being a little off.
Do you mind either rebasing these changes from the current main branch, or raise a new PR based from main with just your changes in a commit?

@andylamp
Copy link
Contributor Author

@Tomdango yes, let me do that in a bit. Closing the PR and I'll open a new one.

@andylamp andylamp closed this Jan 26, 2024
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.

2 participants