Skip to content

(aws-fsx): autoImportPolicy cannot be set in LustreConfiguration #21288

@tcutts

Description

@tcutts

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

  1. Add a LustreAutoImportPolicy enum with the four options this can have
  2. Add an optional autoImportPolicy to LustreConfiguration, with type set to this enum
  3. 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

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.33.0

Environment details (OS name and version, etc.)

Mac OS X 10.15

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-fsxRelated to Amazon FSxeffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions