File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1479,6 +1479,7 @@ exports[`The Report stack matches the snapshot for CODE 1`] = `
14791479 },
14801480 ],
14811481 " BillingMode" : " PAY_PER_REQUEST" ,
1482+ " DeletionProtectionEnabled" : true ,
14821483 " GlobalSecondaryIndexes" : [
14831484 {
14841485 " IndexName" : " sentTime-index" ,
@@ -3316,6 +3317,7 @@ exports[`The Report stack matches the snapshot for PROD 1`] = `
33163317 },
33173318 ],
33183319 " BillingMode" : " PAY_PER_REQUEST" ,
3320+ " DeletionProtectionEnabled" : true ,
33193321 " GlobalSecondaryIndexes" : [
33203322 {
33213323 " IndexName" : " sentTime-index" ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { GuCname } from '@guardian/cdk/lib/constructs/dns';
66import { GuDynamoTable } from '@guardian/cdk/lib/constructs/dynamodb' ;
77import { GuAllowPolicy } from '@guardian/cdk/lib/constructs/iam' ;
88import { GuEc2AppExperimental } from '@guardian/cdk/lib/experimental/patterns/ec2-app' ;
9- import type { App , CfnResource } from 'aws-cdk-lib' ;
9+ import type { App } from 'aws-cdk-lib' ;
1010import { Duration , RemovalPolicy } from 'aws-cdk-lib' ;
1111import type { CfnAutoScalingGroup } from 'aws-cdk-lib/aws-autoscaling' ;
1212import {
@@ -58,11 +58,6 @@ export class Report extends GuStack {
5858 timeToLiveAttribute : 'ttl' ,
5959 } ) ;
6060
61- // Remove DeletionProtectionEnabled property to match YAML defined version of the table
62- ( dynamoTable . node . defaultChild as CfnResource ) . addPropertyDeletionOverride (
63- 'DeletionProtectionEnabled' ,
64- ) ;
65-
6661 dynamoTable . addGlobalSecondaryIndex ( {
6762 indexName : 'sentTime-index' ,
6863 partitionKey : { name : 'type' , type : AttributeType . STRING } ,
You can’t perform that action at this time.
0 commit comments