opened
tom10271
username_0
<!--
description of the bug:
-->

### Reproduction Steps
It is hard for me to write everything down here or to prepare a minimum reproducible code. I don't time for that

Consider I have a VPC with RDS and EC2, whatever working and then added these.

```ts
export function storageSetup(scope: Construct) {
    STORAGE.EFS.testing = new FileSystem(scope, 'App testing server EFS', {
        vpc: NETWORKING.VPC,
        performanceMode: PerformanceMode.GENERAL_PURPOSE,
        enableAutomaticBackups: true,
        removalPolicy: RemovalPolicy.RETAIN,
        lifecyclePolicy: LifecyclePolicy.AFTER_90_DAYS,
    });
}
```

And run `cdk diff`, the diff is to delete everything but create the EFS.

<!--
minimal amount of code that causes the bug (if possible) or a reference:
-->

### What did you expect to happen?

<!--
What were you trying to achieve by performing the steps above?
-->

### What actually happened?

<!--
What is the unexpected behavior you were seeing? If you got an error, paste it here.
-->


### Environment

  - **CDK CLI Version  :**  1.95.1 (build ed2bbe6)
  - **Framework Version:**   ???
  - **Node.js Version:** <!-- Version of Node.js (run the command `node -v`) --> v14.15.1
  - **OS               :** macOS Catalina 10.15.2 (19C57)
  - **Language (Version):** <!-- [all | TypeScript (3.8.3) | Java (8)| Python (3.7.3) | etc... ] --> TS ~3.9.7

### Other

<!-- e.g. detailed explanation, stacktraces, related issues, suggestions on how to fix, links for us to have context, eg. associated pull-request, stackoverflow, slack, etc -->




--- 

This is :bug: Bug Report
EFS: No clue but adding EFS into my existing stack result in deletion of everything
issue
created
tom10271
username_0
And here is how CDK no longer delete everything but just to create the EFS is for me to create EFS with specifying which subnet to use

```ts
    STORAGE.EFS.testing = new FileSystem(scope, 'App testing server EFS', {
        vpc: NETWORKING.VPC,
        performanceMode: PerformanceMode.GENERAL_PURPOSE,
        enableAutomaticBackups: true,
        removalPolicy: RemovalPolicy.RETAIN,
        lifecyclePolicy: LifecyclePolicy.AFTER_90_DAYS,
        vpcSubnets: {
            subnets: [NETWORKING.PUBLIC_SUBNET_2B]
        },
    });
```
comment
created
iliapolo
username_1
@username_0 I am not able to reproduce this. 

Using the following code:

```ts
const vpc = new ec2.Vpc(this, 'Vpc');

// Create the Database
new docdb.DatabaseCluster(this, 'todos-database', {
  masterUser: {
    username: 'epolon', // NOTE: 'admin' is reserved by DocumentDB
  },
  instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE),
  vpcSubnets: {
      subnetType: ec2.SubnetType.PRIVATE
  },
  vpc,
  dbClusterName: "todos-database-cluster",
  removalPolicy: cdk.RemovalPolicy.DESTROY,
});
```

If I add an `efs.FileSystem`, I get the expected diff:

```ts
new efs.FileSystem(this, 'FileSystem', {
  vpc,
  performanceMode: efs.PerformanceMode.GENERAL_PURPOSE,
  enableAutomaticBackups: true,
  removalPolicy: cdk.RemovalPolicy.RETAIN,
  lifecyclePolicy: efs.LifecyclePolicy.AFTER_90_DAYS,
});
```

```console
───┬────────────────────────────────────────┬─────┬────────────┬─────────────────┐
│   │ Group                                  │ Dir │ Protocol   │ Peer            │
├───┼────────────────────────────────────────┼─────┼────────────┼─────────────────┤
│ + │ ${FileSystem/EfsSecurityGroup.GroupId} │ Out │ Everything │ Everyone (IPv4) │
└───┴────────────────────────────────────────┴─────┴────────────┴─────────────────┘
(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299)

Resources
[+] AWS::EFS::FileSystem FileSystem FileSystem8A8E25C0 
[+] AWS::EC2::SecurityGroup FileSystem/EfsSecurityGroup FileSystemEfsSecurityGroup212D3ACB 
[+] AWS::EFS::MountTarget FileSystem/EfsMountTarget1 FileSystemEfsMountTarget1586453F0 
[+] AWS::EFS::MountTarget FileSystem/EfsMountTarget2 FileSystemEfsMountTarget24B8EBB43 
[+] AWS::EFS::MountTarget FileSystem/EfsMountTarget3 FileSystemEfsMountTarget37C2F9139 
```

Are you able to reproduce this in a clean installation? Is it possible something in your configuration is causing this? We need an isolated reproduction to keep investigating it.
comment