-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(s3): allow consumers to specify bucket website URL format #1550
Conversation
@rix0rrr if I understand what I've done correctly, I think this PR may only change |
I've marked the Indeed depending on any replies to my comment above there may be some additional changes to this PR that do require new tests added. |
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 would like to see a test on the new format as well, just to make sure.
@@ -1000,6 +1012,8 @@ class ImportedBucket extends BucketBase { | |||
} | |||
|
|||
private generateBucketWebsiteUrl() { | |||
return `${this.bucketName}.s3-website-${new cdk.Aws().region}.amazonaws.com`; | |||
return this.bucketWebsiteNewUrlFormat | |||
? `${this.bucketName}.s3-website-${cdk.Stack.find(this).region}.${cdk.Stack.find(this).urlSuffix}` |
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.
It is just the other way around; new format is with .
, old format is with -
.
I support the default being false
, so that the behavior is the same.
And thank you for submitting this PR! |
. is the new format, not -
@rix0rrr not a problem 😄 I've pushed two changes, one to actually make sure the new format is correct (i.e. with a I agree with you that it feels like there should be a test here, have you got any ideas? Currently it's a |
You're right. It's only for imported buckets, so is not bound to come up often. Thanks! |
Opened after a discussion with @rix0rrr after #1544 was merged.
Pull Request Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.