Skip to content

Commit

Permalink
integ
Browse files Browse the repository at this point in the history
  • Loading branch information
watany-dev committed Dec 27, 2024
1 parent c0733be commit bf5eff9
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 5 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
"Type": "AWS::IAM::User",
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
},
"DestroyBucket924C7F03": {
"Type": "AWS::S3::Bucket",
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
}
},
"Parameters": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ import * as integ from '@aws-cdk/integ-tests-alpha';
const app = new App();
const stack = new Stack(app, 'TestStack');

// Create resources
new s3.Bucket(stack, 'TestBucket');

new dynamodb.Table(stack, 'TestTable', {
partitionKey: { name: 'id', type: dynamodb.AttributeType.STRING },
});

const user = new iam.User(stack, 'TestUser');
user.applyRemovalPolicy(RemovalPolicy.RETAIN);

// Apply different removal policies to demonstrate functionality
new s3.Bucket(stack, 'DestroyBucket', {
removalPolicy: RemovalPolicy.DESTROY,
});

RemovalPolicies.of(stack).destroy();

new integ.IntegTest(app, 'RemovalPoliciesTest', {
Expand Down

0 comments on commit bf5eff9

Please sign in to comment.