Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(fsx): specify file system type version for the Lustre file system (
#31136) ### Issue # (if applicable) Closes #31130 ### Reason for this change We cannot specify Lustre version for the file system. ### Description of changes Add `fileSystemTypeVersion` prop to `LustreFileSystemProps`. There are some restrictions about `fileSystemTypeVersion`. - 2.10 is supported by the Scratch and Persistent_1 Lustre deployment types. - 2.12 is supported by all Lustre deployment types, except for PERSISTENT_2 with a metadata configuration mode. - 2.15 is supported by all Lustre deployment types and is recommended for all new file systems. https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-filesystemtypeversion I've only added validation of V2.10 is supported by the Scratch and Persistent_1 deployment types because `LustreFileSystemProps` does not have metadata configuration props. ```ts private validateFiileSystemTypeVersion(deploymentType: LustreDeploymentType, fileSystemTypeVersion?: FileSystemTypeVersion): void { if (fileSystemTypeVersion === undefined) { return; } if (fileSystemTypeVersion === FileSystemTypeVersion.V_2_10) { if (!deploymentType.startsWith('SCRATCH') && deploymentType !== LustreDeploymentType.PERSISTENT_1) { throw new Error('fileSystemTypeVersion V_2_10 is only supported for SCRATCH and PERSISTENT_1 deployment types'); } } } ``` ### Description of how you validated changes Add both unit and integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information