feat(efs): One-Zone filesystem#28501
Conversation
aws-cdk-automation
left a comment
There was a problem hiding this comment.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.
4ac87bc to
ee5df85
Compare
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
lpizzinidev
left a comment
There was a problem hiding this comment.
Thanks 👍
I left some comments for minor documentation adjustments and a question.
| subnetSelection = { | ||
| ...props.vpcSubnets, | ||
| ...subnetSelection, | ||
| }; |
There was a problem hiding this comment.
Not sure about this, what happens if the user specifies subnets from different AZs?
There was a problem hiding this comment.
Probably, the return value from props.vpc.selectSubnets(subnetSelection) is an empty array, and the mountTarget is not created.
Should it be considered an error when the return value of selectSubnets is an empty array with oneZone=true?
There was a problem hiding this comment.
Given:
- Amazon EFS One Zone file systems support only a single mount target which is located in the same Availability Zone as the file system. You cannot add additional mount targets.
selectSubnetsRequires that at least one subnet is matched, throws a descriptive error message otherwise.
I think that the best option here is to validate that the users can specify either oneZone or vpcSubnets, not both, to prevent deployment errors and change the implementation accordingly.
|
@lpizzinidev Thank you for your review!! I have addressed the comments you provided. |
dd7514f to
fbaa065
Compare
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
fbaa065 to
1e37816
Compare
|
@lpizzinidev I have implemented an error for cases where the vpcSubnets argument is specified in a oneZone file system. |
lpizzinidev
left a comment
There was a problem hiding this comment.
Thanks, just a minor change on the validation message.
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
|
@lpizzinidev Thanks. I fixed it! |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
paulhcsun
left a comment
There was a problem hiding this comment.
Thanks for adding this support for One-Zone filesystems @badmintoncryer! And thanks for reviewing @lpizzinidev!
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
In this PR, I have added support for creating one zone filesystems.
As discussed in the issue, I considered including
availabilityZoneNamein the props, but for now, I have added only theoneZoneargument.The
efs.FileSystemconstruct also generates a mount target simultaneously. However, when creating a one zone file system, both the mount target and the file system should be located in the same Availability Zone. The issue arises because the name of the Availability Zone where the mount target will be placed (obtained fromprops.vpc.selectSubnets()) remains token, making it impossible to compare it with the givenavailabilityZoneName.Please let me know if there is a smart way to resolve this.
Closes #15864
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license