Repository navigation
Commit a15dc93
authored
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
14 files changed
Lines changed: 2898 additions & 0 deletions
File tree
- packages
- @aws-cdk-testing/framework-integ/test/aws-efs/test
- integ.efs-filesystem-replication.js.snapshot
- asset.e978ad4ad0dca7e1c6be5f49cbbd1c5a150ee050c24052fedfe5a42f835d55da
- aws-cdk-lib/aws-efs
- lib
- test
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments