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

feat(efs): create read-only file system for use as a destination of replication #28913

Merged
merged 11 commits into from
Feb 7, 2024

Conversation

badmintoncryer
Copy link
Contributor

@badmintoncryer badmintoncryer commented Jan 29, 2024

In this PR, I have added the replicationOverwriteProtection argument to the L2 construct. This enables the creation of a filesystem that can be used as a destination for replication.

const fileSystem = new efs.FileSystem(this, 'MyEfsFileSystem', {
  vpc: new ec2.Vpc(this, 'VPC'),
  replicationOverwriteProtection: true, // Set to false if you want to create a read-only file system for use as a replication destination
});

Closes #28912.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added feature-request A feature should be added or improved. p2 labels Jan 29, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team January 29, 2024 15:49
@github-actions github-actions bot added the admired-contributor [Pilot] contributed between 13-24 PRs to the CDK label Jan 29, 2024
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@badmintoncryer badmintoncryer marked this pull request as ready for review January 29, 2024 16:16
@aws-cdk-automation aws-cdk-automation dismissed their stale review January 29, 2024 16:16

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@github-actions github-actions bot added the effort/medium Medium work item – several days of effort label Jan 29, 2024
@badmintoncryer badmintoncryer changed the title feat(efs): create read-only file system for replication destination file system feat(efs): create read-only file system for use as a destination of replication Jan 29, 2024
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jan 30, 2024
Copy link
Contributor

@aaythapa aaythapa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you once again for your contribution!

I'd suggest we use enums in this case. I understand that there are other CFN properties that take either ENABLED or DISABLED but in CDK they're boolean so this change would be consistent with that.

But in the future if CFN adds more valid values then we'll regret making this a boolean. Plus if its enums we can do a simple pass through and don't have to do any extra meddling in the code.

packages/aws-cdk-lib/aws-efs/lib/efs-file-system.ts Outdated Show resolved Hide resolved
@badmintoncryer
Copy link
Contributor Author

@aaythapa

Thank you for the review. As you suggested, I have revised it to use the enum format.
Could you please check it again?

aaythapa
aaythapa previously approved these changes Feb 6, 2024
@mergify mergify bot dismissed aaythapa’s stale review February 7, 2024 14:28

Pull request has been modified.

@badmintoncryer
Copy link
Contributor Author

@aaythapa
I have resolved the failure in the CI. Please check again!

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 84e289d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

mergify bot commented Feb 7, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 832f70c into aws:main Feb 7, 2024
10 checks passed
@badmintoncryer badmintoncryer deleted the fileSystemProtection branch February 8, 2024 01:19
TheRealAmazonKendra pushed a commit that referenced this pull request Feb 9, 2024
…eplication (#28913)

In this PR, I have added the `replicationOverwriteProtection` argument to the L2 construct. This enables the creation of a filesystem that can be used as a destination for replication.

```ts
const fileSystem = new efs.FileSystem(this, 'MyEfsFileSystem', {
  vpc: new ec2.Vpc(this, 'VPC'),
  replicationOverwriteProtection: true, // Set to false if you want to create a read-only file system for use as a replication destination
});
```

Closes #28912.

----

*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
admired-contributor [Pilot] contributed between 13-24 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

efs: support for FileSystemProtection property for file system
3 participants