Created
March 9, 2021 17:40
-
-
Save fogfish/2580fd40a24fe034ef22d6608a7f51d6 to your computer and use it in GitHub Desktop.
AWS CDK Bomb π£
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as cdk from '@aws-cdk/core' | |
class MyResource extends cdk.Construct { | |
constructor(scope: cdk.Construct, id: string, l: number) { | |
super(scope, id) | |
for (const x of Array(10).keys()) { | |
(l === 0) | |
? new cdk.CfnJson(this, `${id}${x}`, {value: '0123456789abcdef'}) | |
: new MyResource(this, `${id}${x}`, l - 1) | |
} | |
} | |
} | |
class MyStack extends cdk.Stack { | |
constructor (scope: cdk.Construct) { | |
super(scope, 'Stack', {}) | |
new MyResource(this, 'R', 10) | |
} | |
} | |
new MyStack(app) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure what the underlying issue is, but I find this interesting: