Skip to content

Instantly share code, notes, and snippets.

@tmokmss
Last active December 11, 2022 03:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmokmss/7b12fac0f33bde3740ce0f81eb944b52 to your computer and use it in GitHub Desktop.
Save tmokmss/7b12fac0f33bde3740ce0f81eb944b52 to your computer and use it in GitHub Desktop.
VSCode snippet for AWS CDK
{
"CDK Construct": {
"prefix": "cdk-constructv2",
"body": [
"import { Construct } from 'constructs';",
"",
"export interface ${1:ConstructName}Props {",
"",
"}",
"",
"export class ${1:ConstructName} extends Construct {",
" constructor(scope: Construct, id: string, props: ${1:ConstructName}Props) {",
" super(scope, id);",
"",
" ${2}",
" }",
"}"
],
"description": "Generate a CDK construct scaffold for CDK v2"
},
"CDK Import": {
"prefix": "cdk-import",
"body": ["import * as ${1:service} from 'aws-cdk-lib/aws-${1:service}';"],
"description": "Generate a CDK import statement"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment