Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 2 tasks
tcutts opened this issue Jul 22, 2022 · 1 comment · Fixed by #21301
Closed
1 of 2 tasks

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

tcutts opened this issue Jul 22, 2022 · 1 comment · Fixed by #21301
Labels
@aws-cdk/aws-fsx Related to Amazon FSx effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1

Comments

@tcutts
Copy link
Contributor

tcutts commented Jul 22, 2022

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

@tcutts tcutts added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jul 22, 2022
@github-actions github-actions bot added the @aws-cdk/aws-fsx Related to Amazon FSx label Jul 22, 2022
@rix0rrr rix0rrr added effort/medium Medium work item – several days of effort p1 and removed needs-triage This issue or PR still needs to be triaged. labels Jul 25, 2022
@rix0rrr rix0rrr removed their assignment Jul 25, 2022
@rix0rrr rix0rrr changed the title (aws-fsx): (autoImportPolicy cannot be set in LustreConfiguration) (aws-fsx): autoImportPolicy cannot be set in LustreConfiguration Jul 25, 2022
@mergify mergify bot closed this as completed in #21301 Jul 28, 2022
mergify bot pushed a commit that referenced this issue Jul 28, 2022
----
closes #21288

The LustreFilesystem construct already supports a backing S3 bucket, through the importPath/exportPath parameters.
CloudFormation supports an AutoImportPolicy parameter, to perform this import automatically and continuously if required.  Currently, the L2 construct does not allow this parameter to be set.  This PR adds that capability.

### All Submissions:

* [yes] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [no] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [yes] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [yes] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

josephedward pushed a commit to josephedward/aws-cdk that referenced this issue Aug 30, 2022
----
closes aws#21288

The LustreFilesystem construct already supports a backing S3 bucket, through the importPath/exportPath parameters.
CloudFormation supports an AutoImportPolicy parameter, to perform this import automatically and continuously if required.  Currently, the L2 construct does not allow this parameter to be set.  This PR adds that capability.

### All Submissions:

* [yes] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [no] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [yes] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [yes] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-fsx Related to Amazon FSx effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants