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

fix: UserPool, Volume, ElasticSearch, FSx are now RETAIN by default #12920

Merged
merged 47 commits into from
Feb 22, 2021
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
0b3e755
Cognito User Pool
rix0rrr Feb 1, 2021
aec4c1b
EC2 Volume
rix0rrr Feb 1, 2021
e09ea5e
ElasticSearch Domain
rix0rrr Feb 1, 2021
2fd98f7
FSx FileSystem
rix0rrr Feb 1, 2021
51b4c71
WIP SQS
rix0rrr Feb 8, 2021
6810bcf
SQS Queue
rix0rrr Feb 8, 2021
2753d11
NestedStack
rix0rrr Feb 8, 2021
e6acca6
Merge branch 'huijbers/removal-policy' of github.com:aws/aws-cdk into…
rix0rrr Feb 8, 2021
d6d0141
Merge remote-tracking branch 'origin/master' into huijbers/removal-po…
rix0rrr Feb 8, 2021
6a6fbad
Update expectation
rix0rrr Feb 8, 2021
8c2e64d
Update expectations
rix0rrr Feb 8, 2021
45ccb58
Update packages/@aws-cdk/aws-cognito/lib/user-pool.ts
rix0rrr Feb 9, 2021
28c1d68
Merge branch 'master' into huijbers/removal-policy
rix0rrr Feb 9, 2021
48b49f6
Update expectations
rix0rrr Feb 9, 2021
35d2abb
Merge remote-tracking branch 'origin/master' into huijbers/removal-po…
rix0rrr Feb 9, 2021
f25897b
Update expectation
rix0rrr Feb 9, 2021
994d8c3
Update expectations
rix0rrr Feb 9, 2021
19a7333
Update expectations
rix0rrr Feb 9, 2021
35df786
Update expectations
rix0rrr Feb 10, 2021
6d84f7c
Update expectations
rix0rrr Feb 10, 2021
ddb2dfe
Updat expectations
rix0rrr Feb 10, 2021
0fb4aef
Update expectations
rix0rrr Feb 10, 2021
3a4fa06
Import stateful resources from cfnlint and affect codegen
rix0rrr Feb 10, 2021
aafe91f
SHould have been 'protected'
rix0rrr Feb 11, 2021
981ae9e
RDS explicitly leaves out policies that we want in
rix0rrr Feb 11, 2021
e85532b
Merge branch 'master' into huijbers/removal-policy
rix0rrr Feb 11, 2021
d0c4a0f
Fix linter issue
rix0rrr Feb 11, 2021
8ae2215
Update expectation
Feb 11, 2021
b5b90e9
Add required policy to EFS
rix0rrr Feb 11, 2021
37143e7
Update integ test
rix0rrr Feb 12, 2021
845a02b
Update expectations
rix0rrr Feb 12, 2021
641a708
Only apply L1 check when writing L2
rix0rrr Feb 12, 2021
e906d4c
Update expectations
rix0rrr Feb 12, 2021
634b108
Merge remote-tracking branch 'origin/master' into huijbers/removal-po…
rix0rrr Feb 16, 2021
ee1d015
Test for all combinations of cluster and instance removalpolicy
rix0rrr Feb 16, 2021
6b07aa5
Merge remote-tracking branch 'origin/master' into huijbers/removal-po…
rix0rrr Feb 17, 2021
0eee523
Properly set removalpolicy value of DBSubnetGroup
rix0rrr Feb 17, 2021
bd1dd76
Merge remote-tracking branch 'origin/master' into huijbers/removal-po…
rix0rrr Feb 17, 2021
fbd9aa6
Update snapshots you know
rix0rrr Feb 17, 2021
c152625
Switch to this.node.addValidation()
rix0rrr Feb 19, 2021
b053d49
Add construct-compat for addValidation()
rix0rrr Feb 19, 2021
2f09cc3
Make the construct-based validation work
rix0rrr Feb 19, 2021
1b0e894
Thanks eslint
rix0rrr Feb 19, 2021
d18bf9d
Test tells me compatibility is already ensured! ON to the new way!
rix0rrr Feb 22, 2021
d6e8813
Merge remote-tracking branch 'origin/master' into huijbers/removal-po…
rix0rrr Feb 22, 2021
3edf12a
Update expectations
rix0rrr Feb 22, 2021
4a72864
Merge branch 'master' into huijbers/removal-policy
mergify[bot] Feb 22, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,9 @@
"Type": "AWS::SQS::Queue",
"Properties": {
"MessageRetentionPeriod": 1209600
}
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"nameserviceTaskRecordManagerEventsQueueF805A6C1": {
"Type": "AWS::SQS::Queue",
Expand All @@ -415,7 +417,9 @@
"maxReceiveCount": 500
},
"VisibilityTimeout": 30
}
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"nameserviceTaskRecordManagerEventsQueuePolicy65CC6F9E": {
"Type": "AWS::SQS::QueuePolicy",
Expand Down Expand Up @@ -746,14 +750,12 @@
]
}
},
"Handler": "index.queue_handler",
"Role": {
"Fn::GetAtt": [
"nameserviceTaskRecordManagerEventHandlerServiceRoleE66EE52A",
"Arn"
]
},
"Runtime": "python3.8",
"Environment": {
"Variables": {
"HOSTED_ZONE_ID": {
Expand All @@ -777,7 +779,9 @@
}
}
},
"Handler": "index.queue_handler",
"ReservedConcurrentExecutions": 1,
"Runtime": "python3.8",
"Timeout": 30
},
"DependsOn": [
Expand All @@ -788,14 +792,14 @@
"nameserviceTaskRecordManagerEventHandlerSqsEventSourceawsecsintegnameserviceTaskRecordManagerEventsQueueC5EE9A869F1EB155": {
"Type": "AWS::Lambda::EventSourceMapping",
"Properties": {
"FunctionName": {
"Ref": "nameserviceTaskRecordManagerEventHandler4B8C6905"
},
"EventSourceArn": {
"Fn::GetAtt": [
"nameserviceTaskRecordManagerEventsQueueF805A6C1",
"Arn"
]
},
"FunctionName": {
"Ref": "nameserviceTaskRecordManagerEventHandler4B8C6905"
}
}
},
Expand Down Expand Up @@ -909,13 +913,13 @@
]
}
},
"Handler": "index.cleanup_resource_handler",
"Role": {
"Fn::GetAtt": [
"nameserviceTaskRecordManagerCleanupResourceProviderHandlerServiceRoleCCA462F0",
"Arn"
]
},
"Handler": "index.cleanup_resource_handler",
"Runtime": "python3.8",
"Timeout": 300
},
Expand Down Expand Up @@ -1022,14 +1026,12 @@
]
}
},
"Handler": "framework.onEvent",
"Role": {
"Fn::GetAtt": [
"nameserviceTaskRecordManagerCleanupResourceProviderframeworkonEventServiceRoleF0570BD0",
"Arn"
]
},
"Runtime": "nodejs10.x",
"Description": "AWS CDK resource provider framework - onEvent (aws-ecs-integ/name-service/TaskRecordManager/CleanupResourceProvider)",
"Environment": {
"Variables": {
Expand All @@ -1041,6 +1043,8 @@
}
}
},
"Handler": "framework.onEvent",
"Runtime": "nodejs10.x",
"Timeout": 900
},
"DependsOn": [
Expand Down Expand Up @@ -1242,13 +1246,13 @@
]
}
},
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2",
"Arn"
]
},
"Handler": "index.handler",
"Runtime": "nodejs12.x",
"Timeout": 120
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
]
]
}
}
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"ServiceloadbalancerD5D60894": {
"Type": "AWS::ElasticLoadBalancingV2::LoadBalancer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"EmailSubject": "Verify your new account",
"SmsMessage": "The verification code to your new account is {####}"
}
}
},
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
},
"myauthorizer23CB99DD": {
"Type": "AWS::ApiGateway::Authorizer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@
"Ref": "RestApi0C43BF4B"
}
}
}
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"integrestapiimportBooksStackNestedStackintegrestapiimportBooksStackNestedStackResource395C2C9B": {
"Type": "AWS::CloudFormation::Stack",
Expand Down Expand Up @@ -192,7 +194,9 @@
"Ref": "RestApi0C43BF4B"
}
}
}
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"integrestapiimportDeployStackNestedStackintegrestapiimportDeployStackNestedStackResource0D0EE737": {
"Type": "AWS::CloudFormation::Stack",
Expand Down Expand Up @@ -252,7 +256,9 @@
"DependsOn": [
"integrestapiimportBooksStackNestedStackintegrestapiimportBooksStackNestedStackResource395C2C9B",
"integrestapiimportPetsStackNestedStackintegrestapiimportPetsStackNestedStackResource2B31898B"
]
],
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
}
},
"Outputs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@
"EmailSubject": "Verify your new account",
"SmsMessage": "The verification code to your new account is {####}"
}
}
},
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
},
"userpoolmyclientFAD947AB": {
"Type": "AWS::Cognito::UserPoolClient",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"EmailSubject": "Verify your new account",
"SmsMessage": "The verification code to your new account is {####}"
}
}
},
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
},
"ApiF70053CD": {
"Type": "AWS::AppSync::GraphQLApi",
Expand Down Expand Up @@ -400,14 +402,12 @@
]
}
},
"Handler": "iam-query.handler",
"Role": {
"Fn::GetAtt": [
"LambdaIAM687B49AF",
"Arn"
]
},
"Runtime": "nodejs12.x",
"Environment": {
"Variables": {
"APPSYNC_ENDPOINT": {
Expand All @@ -417,7 +417,9 @@
]
}
}
}
},
"Handler": "iam-query.handler",
"Runtime": "nodejs12.x"
},
"DependsOn": [
"LambdaIAMDefaultPolicy96DEA124",
Expand Down Expand Up @@ -496,14 +498,12 @@
]
}
},
"Handler": "iam-query.handler",
"Role": {
"Fn::GetAtt": [
"testFailServiceRole9FF22F85",
"Arn"
]
},
"Runtime": "nodejs12.x",
"Environment": {
"Variables": {
"APPSYNC_ENDPOINT": {
Expand All @@ -513,7 +513,9 @@
]
}
}
}
},
"Handler": "iam-query.handler",
"Runtime": "nodejs12.x"
},
"DependsOn": [
"testFailServiceRole9FF22F85"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"EmailSubject": "Verify your new account",
"SmsMessage": "The verification code to your new account is {####}"
}
}
},
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
},
"ApiF70053CD": {
"Type": "AWS::AppSync::GraphQLApi",
Expand Down
4 changes: 3 additions & 1 deletion packages/@aws-cdk/aws-backup/test/integ.backup.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
"DeletionPolicy": "Delete"
},
"FileSystem": {
"Type": "AWS::EFS::FileSystem"
"Type": "AWS::EFS::FileSystem",
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"Vault23237E5B": {
"Type": "AWS::Backup::BackupVault",
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-backup/test/integ.backup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class TestStack extends Stack {
removalPolicy: RemovalPolicy.DESTROY,
});

new efs.CfnFileSystem(this, 'FileSystem');
const fs = new efs.CfnFileSystem(this, 'FileSystem');
fs.applyRemovalPolicy(RemovalPolicy.DESTROY);

const vault = new backup.BackupVault(this, 'Vault', {
removalPolicy: RemovalPolicy.DESTROY,
Expand Down
5 changes: 3 additions & 2 deletions packages/@aws-cdk/aws-backup/test/selection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import '@aws-cdk/assert/jest';
import * as dynamodb from '@aws-cdk/aws-dynamodb';
import * as ec2 from '@aws-cdk/aws-ec2';
import * as efs from '@aws-cdk/aws-efs';
import { Stack } from '@aws-cdk/core';
import { RemovalPolicy, Stack } from '@aws-cdk/core';
import { Construct } from 'constructs';
import { BackupPlan, BackupResource, BackupSelection } from '../lib';

Expand Down Expand Up @@ -128,7 +128,8 @@ test('fromConstruct', () => {
class EfsConstruct extends CoreConstruct {
constructor(scope: Construct, id: string) {
super(scope, id);
new efs.CfnFileSystem(this, 'FileSystem');
const fs = new efs.CfnFileSystem(this, 'FileSystem');
fs.applyRemovalPolicy(RemovalPolicy.DESTROY);
}
}
class MyConstruct extends CoreConstruct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"Resources": {
"SubscriberQueueC193DC66": {
"Type": "AWS::SQS::Queue"
"Type": "AWS::SQS::Queue",
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"SubscriberQueuePolicy25A0799E": {
"Type": "AWS::SQS::QueuePolicy",
Expand Down Expand Up @@ -196,7 +198,9 @@
"Ref": "SubscriberQueueC193DC66"
}
}
}
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"NestedStack2NestedStackNestedStack2NestedStackResourceFDF82E43": {
"Type": "AWS::CloudFormation::Stack",
Expand Down Expand Up @@ -250,7 +254,9 @@
"Parameters": {
"TopicNamePrefix": "Prefix2"
}
}
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
}
},
"Parameters": {
Expand Down
Loading