Skip to content

Commit a15dc93

Browse files
feat(efs): replicating file systems (#29347)
### Issue # (if applicable) Closes #21455. ### Reason for this change EFS supports [replicating file systems](https://docs.aws.amazon.com/efs/latest/ug/efs-replication.html) but AWS CDK cannot configure it. ### Description of changes Add `replicationConfiguration` to `FileSystemProps` ```ts declare const vpc: ec2.Vpc; declare const kmsKey: kms.Key; // auto generate a replication destination file system new efs.FileSystem(this, 'ReplicationSourceFileSystem1', { vpc, replicationConfiguration: { kmsKey, // optional region: 'us-east-1', // optional availabilityZone: 'us-east-1a', // optional, Specifing the AZ means creating a One Zone file system as the replication destination } }); // specify the replication destination file system const destinationFileSystem = new efs.FileSystem(this, 'DestinationFileSystem', { vpc, // set as the read-only file system for use as a replication destination replicationOverwriteProtection: efs.ReplicationOverwriteProtection.DISABLED, }); new efs.FileSystem(this, 'ReplicationSourceFileSystem2', { vpc, replicationConfiguration: { destinationFileSystem, // cannot configure other properties when destinationFileSystem is specified } }); ``` ### Description of how you validated changes I have added 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 6fdc458 commit a15dc93

File tree

14 files changed

+2898
-0
lines changed

14 files changed

+2898
-0
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-efs/test/integ.efs-filesystem-replication.js.snapshot/asset.e978ad4ad0dca7e1c6be5f49cbbd1c5a150ee050c24052fedfe5a42f835d55da/__entrypoint__.js

Lines changed: 156 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-efs/test/integ.efs-filesystem-replication.js.snapshot/asset.e978ad4ad0dca7e1c6be5f49cbbd1c5a150ee050c24052fedfe5a42f835d55da/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-efs/test/integ.efs-filesystem-replication.js.snapshot/cdk.out

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-efs/test/integ.efs-filesystem-replication.js.snapshot/efsReplication.assets.json

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)