Skip to content

Commit 252cca9

Browse files
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*
1 parent 799b541 commit 252cca9

14 files changed

+2335
-2
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-fsx/test/integ.lustre-file-system-file-system-type-version.js.snapshot/FsxLustreFileSystemTypeVersionStack.assets.json

+32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)