-
Notifications
You must be signed in to change notification settings - Fork 16
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
[Issue #3097] Adds configuration for S3 CDN #3477
base: main
Are you sure you want to change the base?
Conversation
variable "s3_cdn_domain_name" { | ||
description = "The domain name of the S3 bucket to use for the S3 CDN" | ||
type = string | ||
default = null | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't need to be in this PR, but we'll want this value to be an env var the API gets.
The plan I had for this was just to swap out the s3 bucket for the CDN domain name on the fly in the API (eg. s3://public-bucket-1234/path/to/file.txt
becomes https://the-cdn-name/path/to/file.txt
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can build that into this PR!
@coilysiren, just to make sure I'm clear.
|
2 CDNs, which is my preference. |
Comment edited for clarity, and yes. |
Ok, great, that's what I was hoping, but just couldn't put all the terraform together in my head to be sure. I think that's going to be very beneficial as we look to do mass-invalidation on deploy (which wouldn't need to touch the S3 CDN at all for example). |
Summary
Probably finishes #3097
Time to review: 5 mins
Changes proposed
Adds configuration to the CDN that allows it to operate in 4 modes:
Context for reviewers
It's complicated in here 😅
Testing
I tested by deploying to API dev and frontend dev