Describe the feature
Add autoImportPolicy support to LustreConfiguration
Use Case
If a Lustre filesystem is backed by S3, it's important to be able to set the policy as to what happens to the visibility of files in Lustre if the S3 bucket changes. This is important for enabling the user to dynamically destroy and recreate the FSx filesystem independently of the bucket, and thus save costs.
CloudFormation supports this through setting AutoImportPolicy in the LustreConfiguration.
Proposed Solution
- Add a LustreAutoImportPolicy enum with the four options this can have
- Add an optional autoImportPolicy to LustreConfiguration, with type set to this enum
- Add validateAutoImportPolicy method so that (a) autoImportPolicy only makes sense if importPath is also set, and (b) throw an error if it's attempted with DeploymentType.PERSISTENT_2, which is not a currently supported combination
This would allow CDK code something like this:
const lustrefs = new fsx.LustreFileSystem(this, "Lustre", {
vpc,
vpcSubnet,
storageCapacityGiB: 1200,
lustreConfiguration: {
deploymentType: fsx.LustreDeploymentType.PERSISTENT_1,
exportPath: bucket.s3UrlForObject(),
importPath: bucket.s3UrlForObject(),
autoImportPolicy: fsx.LustreAutoImportPolicy.NEW_CHANGED_DELETED,
perUnitStorageThroughput: 50,
},
});
Other Information
I have already implemented this, together with tests.
Acknowledgements
CDK version used
2.33.0
Environment details (OS name and version, etc.)
Mac OS X 10.15
Describe the feature
Add autoImportPolicy support to LustreConfiguration
Use Case
If a Lustre filesystem is backed by S3, it's important to be able to set the policy as to what happens to the visibility of files in Lustre if the S3 bucket changes. This is important for enabling the user to dynamically destroy and recreate the FSx filesystem independently of the bucket, and thus save costs.
CloudFormation supports this through setting AutoImportPolicy in the LustreConfiguration.
Proposed Solution
This would allow CDK code something like this:
Other Information
I have already implemented this, together with tests.
Acknowledgements
CDK version used
2.33.0
Environment details (OS name and version, etc.)
Mac OS X 10.15