EFS: It forces me to replace the EFS which have files #20049
-
Describe the bugI have upgraded from CDK v1 to v2. I have fixed import paths in files only. My EFS has not specified When I run
When I explicitly set it to false, it still ask for a EFS replacement.
Expected BehaviorIt should not replace my EFS if I set to false as it was not enabled at all. Current BehaviorEither true or false for Reproduction StepsCreate EFS in v1 new FileSystem(scope, 'My worker EFS', {
vpc: NETWORKING.VPC,
// Updating this property will replace the file system.
performanceMode: PerformanceMode.GENERAL_PURPOSE,
vpcSubnets: {
subnets: [NETWORKING.PUBLIC_SUBNET_2B]
},
enableAutomaticBackups: true,
removalPolicy: RemovalPolicy.RETAIN,
lifecyclePolicy: LifecyclePolicy.AFTER_90_DAYS,
}); Then run Possible SolutionYou fix it :) Additional Information/ContextNo response CDK CLI Version2.20.0 (build 738ef49) Framework VersionNo response Node.js Versionv14.19.1 OSmacOS 12.3.1 (21E258) LanguageTypescript Language Version~3.9.7 Other informationNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hey @tom10271, going to migrate this to a discussion. Adding encryption was part of our graduating this module to stable. This was back a year ago, so before we released v2. What we did to prevent breaking existing users was to hide this behind a feature flag. However, CDK v2 removed most feature flags. These are the only ones we still support in v2. I believe that your best path forward here is to remove the encryption property with an escape hatch const cfnFs = fs.node.defaultChild as CfnFileSystem;
cfnFs.addPropertyDeletionOverride('Encrypted') |
Beta Was this translation helpful? Give feedback.
-
Why not just pass the |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Hey @tom10271, going to migrate this to a discussion.
Adding encryption was part of our graduating this module to stable. This was back a year ago, so before we released v2. What we did to prevent breaking existing users was to hide this behind a feature flag.
However, CDK v2 removed most feature flags. These are the only ones we still support in v2. I believe that your best path forward here is to remove the encryption property with an escape hatch