@gradientedge/cdk-utils 4.4.7 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/api-destined-function/node_modules/.yarn-integrity +89 -2
- package/app/api-destined-function/node_modules/balanced-match/LICENSE.md +21 -0
- package/app/api-destined-function/node_modules/balanced-match/README.md +97 -0
- package/app/api-destined-function/node_modules/balanced-match/index.js +62 -0
- package/app/api-destined-function/node_modules/balanced-match/package.json +48 -0
- package/app/api-destined-function/node_modules/brace-expansion/LICENSE +21 -0
- package/app/api-destined-function/node_modules/brace-expansion/README.md +129 -0
- package/app/api-destined-function/node_modules/brace-expansion/index.js +201 -0
- package/app/api-destined-function/node_modules/brace-expansion/package.json +47 -0
- package/app/api-destined-function/node_modules/concat-map/.travis.yml +4 -0
- package/app/api-destined-function/node_modules/concat-map/LICENSE +18 -0
- package/app/api-destined-function/node_modules/concat-map/README.markdown +62 -0
- package/app/api-destined-function/node_modules/concat-map/example/map.js +6 -0
- package/app/api-destined-function/node_modules/concat-map/index.js +13 -0
- package/app/api-destined-function/node_modules/concat-map/package.json +43 -0
- package/app/api-destined-function/node_modules/fs.realpath/LICENSE +43 -0
- package/app/api-destined-function/node_modules/fs.realpath/README.md +33 -0
- package/app/api-destined-function/node_modules/fs.realpath/index.js +66 -0
- package/app/api-destined-function/node_modules/fs.realpath/old.js +303 -0
- package/app/api-destined-function/node_modules/fs.realpath/package.json +26 -0
- package/app/api-destined-function/node_modules/glob/LICENSE +21 -0
- package/app/api-destined-function/node_modules/glob/README.md +378 -0
- package/app/api-destined-function/node_modules/glob/common.js +236 -0
- package/app/api-destined-function/node_modules/glob/glob.js +787 -0
- package/app/api-destined-function/node_modules/glob/package.json +52 -0
- package/app/api-destined-function/node_modules/glob/sync.js +483 -0
- package/app/api-destined-function/node_modules/inflight/LICENSE +15 -0
- package/app/api-destined-function/node_modules/inflight/README.md +37 -0
- package/app/api-destined-function/node_modules/inflight/inflight.js +54 -0
- package/app/api-destined-function/node_modules/inflight/package.json +29 -0
- package/app/api-destined-function/node_modules/inherits/LICENSE +16 -0
- package/app/api-destined-function/node_modules/inherits/README.md +42 -0
- package/app/api-destined-function/node_modules/inherits/inherits.js +9 -0
- package/app/api-destined-function/node_modules/inherits/inherits_browser.js +27 -0
- package/app/api-destined-function/node_modules/inherits/package.json +29 -0
- package/app/api-destined-function/node_modules/minimatch/LICENSE +15 -0
- package/app/api-destined-function/node_modules/minimatch/README.md +209 -0
- package/app/api-destined-function/node_modules/minimatch/minimatch.js +952 -0
- package/app/api-destined-function/node_modules/minimatch/package.json +30 -0
- package/app/api-destined-function/node_modules/mkdirp/LICENSE +21 -0
- package/app/api-destined-function/node_modules/mkdirp/bin/cmd.js +68 -0
- package/app/api-destined-function/node_modules/mkdirp/index.js +31 -0
- package/app/api-destined-function/node_modules/mkdirp/lib/find-made.js +29 -0
- package/app/api-destined-function/node_modules/mkdirp/lib/mkdirp-manual.js +64 -0
- package/app/api-destined-function/node_modules/mkdirp/lib/mkdirp-native.js +39 -0
- package/app/api-destined-function/node_modules/mkdirp/lib/opts-arg.js +23 -0
- package/app/api-destined-function/node_modules/mkdirp/lib/path-arg.js +29 -0
- package/app/api-destined-function/node_modules/mkdirp/lib/use-native.js +10 -0
- package/app/api-destined-function/node_modules/mkdirp/package.json +44 -0
- package/app/api-destined-function/node_modules/mkdirp/readme.markdown +266 -0
- package/app/api-destined-function/node_modules/once/LICENSE +15 -0
- package/app/api-destined-function/node_modules/once/README.md +79 -0
- package/app/api-destined-function/node_modules/once/once.js +42 -0
- package/app/api-destined-function/node_modules/once/package.json +33 -0
- package/app/api-destined-function/node_modules/path-is-absolute/index.js +20 -0
- package/app/api-destined-function/node_modules/path-is-absolute/license +21 -0
- package/app/api-destined-function/node_modules/path-is-absolute/package.json +43 -0
- package/app/api-destined-function/node_modules/path-is-absolute/readme.md +59 -0
- package/app/api-destined-function/node_modules/rimraf/LICENSE +15 -0
- package/app/api-destined-function/node_modules/rimraf/README.md +101 -0
- package/app/api-destined-function/node_modules/rimraf/bin.js +68 -0
- package/app/api-destined-function/node_modules/rimraf/package.json +32 -0
- package/app/api-destined-function/node_modules/rimraf/rimraf.js +360 -0
- package/app/api-destined-function/node_modules/uuid/dist/bin/uuid +2 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/md5.js +215 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/rng.js +19 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v35.js +64 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v4.js +24 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/stringify.js +29 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/v35.js +64 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/v4.js +24 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/app/api-destined-function/node_modules/uuid/dist/index.js +79 -0
- package/app/api-destined-function/node_modules/uuid/dist/md5-browser.js +223 -0
- package/app/api-destined-function/node_modules/uuid/dist/md5.js +23 -0
- package/app/api-destined-function/node_modules/uuid/dist/nil.js +8 -0
- package/app/api-destined-function/node_modules/uuid/dist/parse.js +45 -0
- package/app/api-destined-function/node_modules/uuid/dist/regex.js +8 -0
- package/app/api-destined-function/node_modules/uuid/dist/rng-browser.js +26 -0
- package/app/api-destined-function/node_modules/uuid/dist/rng.js +24 -0
- package/app/api-destined-function/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/app/api-destined-function/node_modules/uuid/dist/sha1.js +23 -0
- package/app/api-destined-function/node_modules/uuid/dist/stringify.js +39 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuid.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/app/api-destined-function/node_modules/uuid/dist/v1.js +107 -0
- package/app/api-destined-function/node_modules/uuid/dist/v3.js +16 -0
- package/app/api-destined-function/node_modules/uuid/dist/v35.js +78 -0
- package/app/api-destined-function/node_modules/uuid/dist/v4.js +37 -0
- package/app/api-destined-function/node_modules/uuid/dist/v5.js +16 -0
- package/app/api-destined-function/node_modules/uuid/dist/validate.js +17 -0
- package/app/api-destined-function/node_modules/uuid/dist/version.js +21 -0
- package/app/api-destined-function/node_modules/wrappy/LICENSE +15 -0
- package/app/api-destined-function/node_modules/wrappy/README.md +36 -0
- package/app/api-destined-function/node_modules/wrappy/package.json +29 -0
- package/app/api-destined-function/node_modules/wrappy/wrappy.js +33 -0
- package/app/api-destined-function/package.json +6 -1
- package/app/api-destined-function/src/lib/lambda.ts +1 -3
- package/dist/app/api-destined-function/layers/nodejs/node_modules/.bin/uuid +2 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/.yarn-integrity +109 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/LICENSE +21 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/README.md +16 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/index.d.mts +10 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/index.d.ts +80 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/package.json +54 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/LICENSE.md +9 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/README.md +505 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/bin/uuid +2 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/md5.js +215 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/rng.js +19 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v35.js +64 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v4.js +24 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/stringify.js +29 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v35.js +64 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v4.js +24 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/index.js +79 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/md5-browser.js +223 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/md5.js +23 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/nil.js +8 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/parse.js +45 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/regex.js +8 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/rng-browser.js +26 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/rng.js +24 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/sha1.js +23 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/stringify.js +39 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuid.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v1.js +107 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v3.js +16 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v35.js +78 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v4.js +37 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v5.js +16 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/validate.js +17 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/version.js +21 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/package.json +135 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/wrapper.mjs +10 -0
- package/dist/app/api-destined-function/layers/nodejs/package.json +30 -0
- package/dist/app/api-destined-function/src/lib/lambda.d.ts +17 -0
- package/dist/app/api-destined-function/src/lib/lambda.d.ts.map +1 -0
- package/dist/app/api-destined-function/src/lib/lambda.js +32 -0
- package/dist/app/api-destined-function/src/lib/lambda.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/src/lib/common/construct.d.ts +81 -0
- package/dist/src/lib/common/construct.d.ts.map +1 -0
- package/dist/src/lib/common/construct.js +136 -0
- package/dist/src/lib/common/construct.js.map +1 -0
- package/dist/src/lib/common/index.d.ts +3 -0
- package/dist/src/lib/common/index.d.ts.map +1 -0
- package/dist/src/lib/common/index.js +15 -0
- package/dist/src/lib/common/index.js.map +1 -0
- package/dist/src/lib/common/stack.d.ts +55 -0
- package/dist/src/lib/common/stack.d.ts.map +1 -0
- package/dist/src/lib/common/stack.js +148 -0
- package/dist/src/lib/common/stack.js.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts +17 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js +18 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts +20 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js +20 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts +36 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js +30 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts +5 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/index.js +17 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/index.js.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +135 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js +488 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js.map +1 -0
- package/dist/src/lib/construct/graphql-api-lambda/index.d.ts +2 -0
- package/dist/src/lib/construct/graphql-api-lambda/index.d.ts.map +1 -0
- package/dist/src/lib/construct/graphql-api-lambda/index.js +14 -0
- package/dist/src/lib/construct/graphql-api-lambda/index.js.map +1 -0
- package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +113 -0
- package/dist/src/lib/construct/graphql-api-lambda/main.d.ts.map +1 -0
- package/dist/src/lib/construct/graphql-api-lambda/main.js +202 -0
- package/dist/src/lib/construct/graphql-api-lambda/main.js.map +1 -0
- package/dist/src/lib/construct/index.d.ts +5 -0
- package/dist/src/lib/construct/index.d.ts.map +1 -0
- package/dist/src/lib/construct/index.js +17 -0
- package/dist/src/lib/construct/index.js.map +1 -0
- package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts +2 -0
- package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts.map +1 -0
- package/dist/src/lib/construct/site-with-ecs-backend/index.js +14 -0
- package/dist/src/lib/construct/site-with-ecs-backend/index.js.map +1 -0
- package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +168 -0
- package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts.map +1 -0
- package/dist/src/lib/construct/site-with-ecs-backend/main.js +328 -0
- package/dist/src/lib/construct/site-with-ecs-backend/main.js.map +1 -0
- package/dist/src/lib/construct/static-site/index.d.ts +2 -0
- package/dist/src/lib/construct/static-site/index.d.ts.map +1 -0
- package/dist/src/lib/construct/static-site/index.js +14 -0
- package/dist/src/lib/construct/static-site/index.js.map +1 -0
- package/dist/src/lib/construct/static-site/main.d.ts +95 -0
- package/dist/src/lib/construct/static-site/main.d.ts.map +1 -0
- package/dist/src/lib/construct/static-site/main.js +169 -0
- package/dist/src/lib/construct/static-site/main.js.map +1 -0
- package/dist/src/lib/manager/aws/acm-manager.d.ts +47 -0
- package/dist/src/lib/manager/aws/acm-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/acm-manager.js +91 -0
- package/dist/src/lib/manager/aws/acm-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/api-manager.d.ts +44 -0
- package/dist/src/lib/manager/aws/api-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/api-manager.js +112 -0
- package/dist/src/lib/manager/aws/api-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/app-config-manager.d.ts +66 -0
- package/dist/src/lib/manager/aws/app-config-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/app-config-manager.js +149 -0
- package/dist/src/lib/manager/aws/app-config-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/cloudfront-manager.d.ts +113 -0
- package/dist/src/lib/manager/aws/cloudfront-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/cloudfront-manager.js +283 -0
- package/dist/src/lib/manager/aws/cloudfront-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts +49 -0
- package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/cloudtrail-manager.js +100 -0
- package/dist/src/lib/manager/aws/cloudtrail-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts +122 -0
- package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/cloudwatch-manager.js +353 -0
- package/dist/src/lib/manager/aws/cloudwatch-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/codebuild-manager.d.ts +41 -0
- package/dist/src/lib/manager/aws/codebuild-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/codebuild-manager.js +95 -0
- package/dist/src/lib/manager/aws/codebuild-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/dynamodb-manager.d.ts +33 -0
- package/dist/src/lib/manager/aws/dynamodb-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/dynamodb-manager.js +80 -0
- package/dist/src/lib/manager/aws/dynamodb-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/ecr-manager.d.ts +32 -0
- package/dist/src/lib/manager/aws/ecr-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/ecr-manager.js +61 -0
- package/dist/src/lib/manager/aws/ecr-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/ecs-manager.d.ts +49 -0
- package/dist/src/lib/manager/aws/ecs-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/ecs-manager.js +104 -0
- package/dist/src/lib/manager/aws/ecs-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/eks-manager.d.ts +37 -0
- package/dist/src/lib/manager/aws/eks-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/eks-manager.js +110 -0
- package/dist/src/lib/manager/aws/eks-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/elasticache-manager.d.ts +43 -0
- package/dist/src/lib/manager/aws/elasticache-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/elasticache-manager.js +103 -0
- package/dist/src/lib/manager/aws/elasticache-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/event-manager.d.ts +68 -0
- package/dist/src/lib/manager/aws/event-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/event-manager.js +163 -0
- package/dist/src/lib/manager/aws/event-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/iam-manager.d.ts +155 -0
- package/dist/src/lib/manager/aws/iam-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/iam-manager.js +381 -0
- package/dist/src/lib/manager/aws/iam-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/index.d.ts +24 -0
- package/dist/src/lib/manager/aws/index.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/index.js +36 -0
- package/dist/src/lib/manager/aws/index.js.map +1 -0
- package/dist/src/lib/manager/aws/lambda-manager.d.ts +95 -0
- package/dist/src/lib/manager/aws/lambda-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/lambda-manager.js +197 -0
- package/dist/src/lib/manager/aws/lambda-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/log-manager.d.ts +52 -0
- package/dist/src/lib/manager/aws/log-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/log-manager.js +109 -0
- package/dist/src/lib/manager/aws/log-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/route53-manager.d.ts +69 -0
- package/dist/src/lib/manager/aws/route53-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/route53-manager.js +159 -0
- package/dist/src/lib/manager/aws/route53-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/s3-manager.d.ts +74 -0
- package/dist/src/lib/manager/aws/s3-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/s3-manager.js +203 -0
- package/dist/src/lib/manager/aws/s3-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/secrets-manager.d.ts +58 -0
- package/dist/src/lib/manager/aws/secrets-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/secrets-manager.js +117 -0
- package/dist/src/lib/manager/aws/secrets-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/sns-manager.d.ts +43 -0
- package/dist/src/lib/manager/aws/sns-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/sns-manager.js +91 -0
- package/dist/src/lib/manager/aws/sns-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/ssm-manager.d.ts +61 -0
- package/dist/src/lib/manager/aws/ssm-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/ssm-manager.js +125 -0
- package/dist/src/lib/manager/aws/ssm-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/vpc-manager.d.ts +46 -0
- package/dist/src/lib/manager/aws/vpc-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/vpc-manager.js +95 -0
- package/dist/src/lib/manager/aws/vpc-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/waf-manager.d.ts +40 -0
- package/dist/src/lib/manager/aws/waf-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/waf-manager.js +90 -0
- package/dist/src/lib/manager/aws/waf-manager.js.map +1 -0
- package/dist/src/lib/manager/index.d.ts +2 -0
- package/dist/src/lib/manager/index.d.ts.map +1 -0
- package/dist/src/lib/manager/index.js +14 -0
- package/dist/src/lib/manager/index.js.map +1 -0
- package/dist/src/lib/types/aws/index.d.ts +487 -0
- package/dist/src/lib/types/aws/index.d.ts.map +1 -0
- package/dist/src/lib/types/aws/index.js +3 -0
- package/dist/src/lib/types/aws/index.js.map +1 -0
- package/dist/src/lib/types/index.d.ts +2 -0
- package/dist/src/lib/types/index.d.ts.map +1 -0
- package/dist/src/lib/types/index.js +14 -0
- package/dist/src/lib/types/index.js.map +1 -0
- package/dist/src/lib/utils/aws/index.d.ts +16 -0
- package/dist/src/lib/utils/aws/index.d.ts.map +1 -0
- package/dist/src/lib/utils/aws/index.js +50 -0
- package/dist/src/lib/utils/aws/index.js.map +1 -0
- package/dist/src/lib/utils/index.d.ts +63 -0
- package/dist/src/lib/utils/index.d.ts.map +1 -0
- package/dist/src/lib/utils/index.js +85 -0
- package/dist/src/lib/utils/index.js.map +1 -0
- package/package.json +11 -11
- package/src/lib/common/construct.ts +2 -0
- package/src/lib/manager/aws/elasticache-manager.ts +98 -0
- package/src/lib/manager/aws/index.ts +1 -0
- package/src/lib/types/aws/index.ts +7 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as ssm from 'aws-cdk-lib/aws-ssm';
|
|
2
|
+
import * as cr from 'aws-cdk-lib/custom-resources';
|
|
3
|
+
import * as common from '../../common';
|
|
4
|
+
import * as types from '../../types';
|
|
5
|
+
/**
|
|
6
|
+
* @stability stable
|
|
7
|
+
* @category cdk-utils.ssm-manager
|
|
8
|
+
* @subcategory Construct
|
|
9
|
+
* @classdesc Provides operations on AWS Systems Manager.
|
|
10
|
+
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
11
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
12
|
+
* @example
|
|
13
|
+
* import { common.CommonConstruct } from '@gradientedge/cdk-utils'
|
|
14
|
+
*
|
|
15
|
+
* class CustomConstruct extends common.CommonConstruct {
|
|
16
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
17
|
+
* super(parent, id, props)
|
|
18
|
+
* this.props = props
|
|
19
|
+
* this.acmManager.writeStringToParameters('MyParameter', this, ...props)
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
23
|
+
* @see [CDK Systems Manager Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ssm-readme.html}
|
|
24
|
+
*/
|
|
25
|
+
export declare class SsmManager {
|
|
26
|
+
/**
|
|
27
|
+
* Method to write a string parameter to the parameters store
|
|
28
|
+
* @param {string} id scoped id of the resource
|
|
29
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
30
|
+
* @param {ssm.StringParameterProps} props parameter props
|
|
31
|
+
*/
|
|
32
|
+
writeStringToParameters(id: string, scope: common.CommonConstruct, props: ssm.StringParameterProps): ssm.StringParameter;
|
|
33
|
+
/**
|
|
34
|
+
* Method to read a string parameter from the parameters store
|
|
35
|
+
* @param {string} id scoped id of the resource
|
|
36
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
37
|
+
* @param {string} parameterName parameter name to lookup
|
|
38
|
+
*/
|
|
39
|
+
readStringParameter(id: string, scope: common.CommonConstruct, parameterName: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Method to read a string parameter from the parameters store in a given region
|
|
42
|
+
* @param {string} id scoped id of the resource
|
|
43
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
44
|
+
* @param {string} parameterName parameter name to lookup
|
|
45
|
+
* @param {string} region region name to lookup parameter
|
|
46
|
+
*/
|
|
47
|
+
readStringParameterFromRegion(id: string, scope: common.CommonConstruct, parameterName: string, region: string): string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @category cdk-utils.ssm-manager
|
|
51
|
+
* @subcategory Construct
|
|
52
|
+
* @classdesc Provides utilities to read same/cross region SSM parameters
|
|
53
|
+
*/
|
|
54
|
+
export declare class SSMParameterReader extends cr.AwsCustomResource {
|
|
55
|
+
constructor(scope: common.CommonConstruct, name: string, props: types.SSMParameterReaderProps);
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
*/
|
|
59
|
+
getParameterValue(): string;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=ssm-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssm-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/ssm-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AAGpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,UAAU;IACrB;;;;;OAKG;IACI,uBAAuB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,KAAK,EAAE,GAAG,CAAC,oBAAoB;IAezG;;;;;OAKG;IACI,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,aAAa,EAAE,MAAM;IAM3F;;;;;;OAMG;IACI,6BAA6B,CAClC,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,CAAC,eAAe,EAC7B,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM;CAUjB;AAED;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,EAAE,CAAC,iBAAiB;gBAC9C,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,uBAAuB;IAmB7F;;OAEG;IACI,iBAAiB,IAAI,MAAM;CAGnC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.SSMParameterReader = exports.SsmManager = void 0;
|
|
23
|
+
const ssm = __importStar(require("aws-cdk-lib/aws-ssm"));
|
|
24
|
+
const cr = __importStar(require("aws-cdk-lib/custom-resources"));
|
|
25
|
+
const utils = __importStar(require("../../utils"));
|
|
26
|
+
/**
|
|
27
|
+
* @stability stable
|
|
28
|
+
* @category cdk-utils.ssm-manager
|
|
29
|
+
* @subcategory Construct
|
|
30
|
+
* @classdesc Provides operations on AWS Systems Manager.
|
|
31
|
+
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
32
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
33
|
+
* @example
|
|
34
|
+
* import { common.CommonConstruct } from '@gradientedge/cdk-utils'
|
|
35
|
+
*
|
|
36
|
+
* class CustomConstruct extends common.CommonConstruct {
|
|
37
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
38
|
+
* super(parent, id, props)
|
|
39
|
+
* this.props = props
|
|
40
|
+
* this.acmManager.writeStringToParameters('MyParameter', this, ...props)
|
|
41
|
+
* }
|
|
42
|
+
* }
|
|
43
|
+
*
|
|
44
|
+
* @see [CDK Systems Manager Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ssm-readme.html}
|
|
45
|
+
*/
|
|
46
|
+
class SsmManager {
|
|
47
|
+
/**
|
|
48
|
+
* Method to write a string parameter to the parameters store
|
|
49
|
+
* @param {string} id scoped id of the resource
|
|
50
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
51
|
+
* @param {ssm.StringParameterProps} props parameter props
|
|
52
|
+
*/
|
|
53
|
+
writeStringToParameters(id, scope, props) {
|
|
54
|
+
if (!props)
|
|
55
|
+
throw `Parameter props undefined`;
|
|
56
|
+
const parameter = new ssm.StringParameter(scope, `${id}`, {
|
|
57
|
+
parameterName: `${props.parameterName}-${scope.props.stage}`,
|
|
58
|
+
description: `${props.description} - ${scope.props.stage} stage`,
|
|
59
|
+
stringValue: props.stringValue,
|
|
60
|
+
});
|
|
61
|
+
utils.createCfnOutput(`${id}-parameterArn`, scope, parameter.parameterArn);
|
|
62
|
+
utils.createCfnOutput(`${id}-parameterName`, scope, parameter.parameterName);
|
|
63
|
+
return parameter;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Method to read a string parameter from the parameters store
|
|
67
|
+
* @param {string} id scoped id of the resource
|
|
68
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
69
|
+
* @param {string} parameterName parameter name to lookup
|
|
70
|
+
*/
|
|
71
|
+
readStringParameter(id, scope, parameterName) {
|
|
72
|
+
if (!parameterName || parameterName == '')
|
|
73
|
+
throw 'Invalid parameter name';
|
|
74
|
+
return ssm.StringParameter.fromStringParameterName(scope, `${id}`, parameterName).stringValue;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Method to read a string parameter from the parameters store in a given region
|
|
78
|
+
* @param {string} id scoped id of the resource
|
|
79
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
80
|
+
* @param {string} parameterName parameter name to lookup
|
|
81
|
+
* @param {string} region region name to lookup parameter
|
|
82
|
+
*/
|
|
83
|
+
readStringParameterFromRegion(id, scope, parameterName, region) {
|
|
84
|
+
if (!parameterName || parameterName == '')
|
|
85
|
+
throw 'Invalid parameter name';
|
|
86
|
+
if (!region || region == '')
|
|
87
|
+
throw 'Invalid region';
|
|
88
|
+
return new SSMParameterReader(scope, `${id}`, {
|
|
89
|
+
parameterName: parameterName,
|
|
90
|
+
region: region,
|
|
91
|
+
}).getParameterValue();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.SsmManager = SsmManager;
|
|
95
|
+
/**
|
|
96
|
+
* @category cdk-utils.ssm-manager
|
|
97
|
+
* @subcategory Construct
|
|
98
|
+
* @classdesc Provides utilities to read same/cross region SSM parameters
|
|
99
|
+
*/
|
|
100
|
+
class SSMParameterReader extends cr.AwsCustomResource {
|
|
101
|
+
constructor(scope, name, props) {
|
|
102
|
+
const { parameterName, region } = props;
|
|
103
|
+
const ssmAwsSdkCall = {
|
|
104
|
+
service: 'SSM',
|
|
105
|
+
action: 'getParameter',
|
|
106
|
+
parameters: {
|
|
107
|
+
Name: `${parameterName}-${scope.props.stage}`,
|
|
108
|
+
},
|
|
109
|
+
region,
|
|
110
|
+
physicalResourceId: cr.PhysicalResourceId.of(Date.now().toString()),
|
|
111
|
+
};
|
|
112
|
+
super(scope, name, {
|
|
113
|
+
onUpdate: ssmAwsSdkCall,
|
|
114
|
+
policy: cr.AwsCustomResourcePolicy.fromSdkCalls({ resources: cr.AwsCustomResourcePolicy.ANY_RESOURCE }),
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
*/
|
|
120
|
+
getParameterValue() {
|
|
121
|
+
return this.getResponseField('Parameter.Value');
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.SSMParameterReader = SSMParameterReader;
|
|
125
|
+
//# sourceMappingURL=ssm-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssm-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/ssm-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,yDAA0C;AAC1C,iEAAkD;AAGlD,mDAAoC;AAEpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,UAAU;IACrB;;;;;OAKG;IACI,uBAAuB,CAAC,EAAU,EAAE,KAA6B,EAAE,KAA+B;QACvG,IAAI,CAAC,KAAK;YAAE,MAAM,2BAA2B,CAAA;QAE7C,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YACxD,aAAa,EAAE,GAAG,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE;YAC5D,WAAW,EAAE,GAAG,KAAK,CAAC,WAAW,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,QAAQ;YAChE,WAAW,EAAE,KAAK,CAAC,WAAW;SAC/B,CAAC,CAAA;QAEF,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,SAAS,CAAC,YAAY,CAAC,CAAA;QAC1E,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,CAAA;QAE5E,OAAO,SAAS,CAAA;IAClB,CAAC;IAED;;;;;OAKG;IACI,mBAAmB,CAAC,EAAU,EAAE,KAA6B,EAAE,aAAqB;QACzF,IAAI,CAAC,aAAa,IAAI,aAAa,IAAI,EAAE;YAAE,MAAM,wBAAwB,CAAA;QAEzE,OAAO,GAAG,CAAC,eAAe,CAAC,uBAAuB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,aAAa,CAAC,CAAC,WAAW,CAAA;IAC/F,CAAC;IAED;;;;;;OAMG;IACI,6BAA6B,CAClC,EAAU,EACV,KAA6B,EAC7B,aAAqB,EACrB,MAAc;QAEd,IAAI,CAAC,aAAa,IAAI,aAAa,IAAI,EAAE;YAAE,MAAM,wBAAwB,CAAA;QACzE,IAAI,CAAC,MAAM,IAAI,MAAM,IAAI,EAAE;YAAE,MAAM,gBAAgB,CAAA;QAEnD,OAAO,IAAI,kBAAkB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YAC5C,aAAa,EAAE,aAAa;YAC5B,MAAM,EAAE,MAAM;SACf,CAAC,CAAC,iBAAiB,EAAE,CAAA;IACxB,CAAC;CACF;AAvDD,gCAuDC;AAED;;;;GAIG;AACH,MAAa,kBAAmB,SAAQ,EAAE,CAAC,iBAAiB;IAC1D,YAAY,KAA6B,EAAE,IAAY,EAAE,KAAoC;QAC3F,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,KAAK,CAAA;QAEvC,MAAM,aAAa,GAAkB;YACnC,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,cAAc;YACtB,UAAU,EAAE;gBACV,IAAI,EAAE,GAAG,aAAa,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE;aAC9C;YACD,MAAM;YACN,kBAAkB,EAAE,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;SACpE,CAAA;QAED,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE;YACjB,QAAQ,EAAE,aAAa;YACvB,MAAM,EAAE,EAAE,CAAC,uBAAuB,CAAC,YAAY,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC,uBAAuB,CAAC,YAAY,EAAE,CAAC;SACxG,CAAC,CAAA;IACJ,CAAC;IAED;;OAEG;IACI,iBAAiB;QACtB,OAAO,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IACjD,CAAC;CACF;AA1BD,gDA0BC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as cdk from 'aws-cdk-lib';
|
|
2
|
+
import * as ec2 from 'aws-cdk-lib/aws-ec2';
|
|
3
|
+
import * as common from '../../common';
|
|
4
|
+
/**
|
|
5
|
+
* @category cdk-utils.vpc-manager
|
|
6
|
+
* @subcategory Construct
|
|
7
|
+
* @classdesc Provides operations on AWS VPC.
|
|
8
|
+
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
9
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
10
|
+
* @example
|
|
11
|
+
* import * as common from '@gradientedge/cdk-utils'
|
|
12
|
+
*
|
|
13
|
+
* class CustomConstruct extends common.common.CommonConstruct {
|
|
14
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
15
|
+
* super(parent, id, props)
|
|
16
|
+
* this.props = props
|
|
17
|
+
* this.vpcManager.createVpc('MyVPC', this)
|
|
18
|
+
* }
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* @see [CDK VPC Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.@aws-cdk_aws-ec2.Vpc.html}
|
|
22
|
+
*/
|
|
23
|
+
export declare class VpcManager {
|
|
24
|
+
/**
|
|
25
|
+
* @summary Method to create a new vpc
|
|
26
|
+
* @param {string} id scoped id of the resource
|
|
27
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
28
|
+
* @param {ec2.VpcProps} props
|
|
29
|
+
*/
|
|
30
|
+
createVpc(id: string, scope: common.CommonConstruct, props: ec2.VpcProps): cdk.aws_ec2.Vpc;
|
|
31
|
+
/**
|
|
32
|
+
* @summary Method to create a common vpc
|
|
33
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
34
|
+
* @param {ec2.VpcProps} props
|
|
35
|
+
* @param {string?} vpcIdentifier optional identifier for VPC
|
|
36
|
+
*/
|
|
37
|
+
createCommonVpc(scope: common.CommonConstruct, props: ec2.VpcProps, vpcIdentifier?: string): cdk.aws_ec2.Vpc;
|
|
38
|
+
/**
|
|
39
|
+
* @summary Method to retrieve a common vpc
|
|
40
|
+
* @param {string} id scoped id of the resource
|
|
41
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
42
|
+
* @param {string?} vpcIdentifier optional identifier for VPC
|
|
43
|
+
*/
|
|
44
|
+
retrieveCommonVpc(id: string, scope: common.CommonConstruct, vpcIdentifier?: string): cdk.aws_ec2.IVpc;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=vpc-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vpc-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/vpc-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,aAAa,CAAA;AAClC,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AAUtC;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,UAAU;IACrB;;;;;OAKG;IACI,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,KAAK,EAAE,GAAG,CAAC,QAAQ;IAyB/E;;;;;OAKG;IACI,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,KAAK,EAAE,GAAG,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAE,MAAM;IAOjG;;;;;OAKG;IACI,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,EAAE,MAAM;CAG3F"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.VpcManager = void 0;
|
|
23
|
+
const cdk = __importStar(require("aws-cdk-lib"));
|
|
24
|
+
const ec2 = __importStar(require("aws-cdk-lib/aws-ec2"));
|
|
25
|
+
const utils = __importStar(require("../../utils"));
|
|
26
|
+
/**
|
|
27
|
+
* @stability stable
|
|
28
|
+
* @category cdk-utils.vpc-manager
|
|
29
|
+
* @subcategory Construct
|
|
30
|
+
*/
|
|
31
|
+
const CommonVpcIdentifier = 'CommonVpc';
|
|
32
|
+
/**
|
|
33
|
+
* @category cdk-utils.vpc-manager
|
|
34
|
+
* @subcategory Construct
|
|
35
|
+
* @classdesc Provides operations on AWS VPC.
|
|
36
|
+
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
37
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
38
|
+
* @example
|
|
39
|
+
* import * as common from '@gradientedge/cdk-utils'
|
|
40
|
+
*
|
|
41
|
+
* class CustomConstruct extends common.common.CommonConstruct {
|
|
42
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
43
|
+
* super(parent, id, props)
|
|
44
|
+
* this.props = props
|
|
45
|
+
* this.vpcManager.createVpc('MyVPC', this)
|
|
46
|
+
* }
|
|
47
|
+
* }
|
|
48
|
+
*
|
|
49
|
+
* @see [CDK VPC Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.@aws-cdk_aws-ec2.Vpc.html}
|
|
50
|
+
*/
|
|
51
|
+
class VpcManager {
|
|
52
|
+
/**
|
|
53
|
+
* @summary Method to create a new vpc
|
|
54
|
+
* @param {string} id scoped id of the resource
|
|
55
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
56
|
+
* @param {ec2.VpcProps} props
|
|
57
|
+
*/
|
|
58
|
+
createVpc(id, scope, props) {
|
|
59
|
+
if (!props)
|
|
60
|
+
throw 'Vpc props undefined';
|
|
61
|
+
const vpc = new ec2.Vpc(scope, `${id}`, {
|
|
62
|
+
maxAzs: props.maxAzs,
|
|
63
|
+
cidr: props.cidr,
|
|
64
|
+
});
|
|
65
|
+
utils.createCfnOutput(`${id}Id`, scope, vpc.vpcId);
|
|
66
|
+
utils.createCfnOutput(`${id}PublicSubnetIds`, scope, vpc.publicSubnets.map(subnet => subnet.subnetId).toString());
|
|
67
|
+
utils.createCfnOutput(`${id}PrivateSubnetIds`, scope, vpc.privateSubnets.map(subnet => subnet.subnetId).toString());
|
|
68
|
+
utils.createCfnOutput(`${id}PublicSubnetRouteTableIds`, scope, vpc.publicSubnets.map(subnet => subnet.routeTable.routeTableId).toString());
|
|
69
|
+
utils.createCfnOutput(`${id}PrivateSubnetRouteTableIds`, scope, vpc.privateSubnets.map(subnet => subnet.routeTable.routeTableId).toString());
|
|
70
|
+
utils.createCfnOutput(`${id}AvailabilityZones`, scope, vpc.availabilityZones.toString());
|
|
71
|
+
return vpc;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @summary Method to create a common vpc
|
|
75
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
76
|
+
* @param {ec2.VpcProps} props
|
|
77
|
+
* @param {string?} vpcIdentifier optional identifier for VPC
|
|
78
|
+
*/
|
|
79
|
+
createCommonVpc(scope, props, vpcIdentifier) {
|
|
80
|
+
const vpc = this.createVpc(CommonVpcIdentifier, scope, props);
|
|
81
|
+
cdk.Tags.of(vpc).add('Name', vpcIdentifier ?? CommonVpcIdentifier);
|
|
82
|
+
return vpc;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @summary Method to retrieve a common vpc
|
|
86
|
+
* @param {string} id scoped id of the resource
|
|
87
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
88
|
+
* @param {string?} vpcIdentifier optional identifier for VPC
|
|
89
|
+
*/
|
|
90
|
+
retrieveCommonVpc(id, scope, vpcIdentifier) {
|
|
91
|
+
return ec2.Vpc.fromLookup(scope, `${id}`, { vpcName: vpcIdentifier ?? CommonVpcIdentifier });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.VpcManager = VpcManager;
|
|
95
|
+
//# sourceMappingURL=vpc-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vpc-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/vpc-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAkC;AAClC,yDAA0C;AAE1C,mDAAoC;AAEpC;;;;GAIG;AACH,MAAM,mBAAmB,GAAG,WAAW,CAAA;AAEvC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,UAAU;IACrB;;;;;OAKG;IACI,SAAS,CAAC,EAAU,EAAE,KAA6B,EAAE,KAAmB;QAC7E,IAAI,CAAC,KAAK;YAAE,MAAM,qBAAqB,CAAA;QACvC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YACtC,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,IAAI,EAAE,KAAK,CAAC,IAAI;SACjB,CAAC,CAAA;QAEF,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAA;QAClD,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA;QACjH,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,kBAAkB,EAAE,KAAK,EAAE,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA;QACnH,KAAK,CAAC,eAAe,CACnB,GAAG,EAAE,2BAA2B,EAChC,KAAK,EACL,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,CAC3E,CAAA;QACD,KAAK,CAAC,eAAe,CACnB,GAAG,EAAE,4BAA4B,EACjC,KAAK,EACL,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,CAC5E,CAAA;QACD,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,mBAAmB,EAAE,KAAK,EAAE,GAAG,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC,CAAA;QAExF,OAAO,GAAG,CAAA;IACZ,CAAC;IAED;;;;;OAKG;IACI,eAAe,CAAC,KAA6B,EAAE,KAAmB,EAAE,aAAsB;QAC/F,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,mBAAmB,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;QAC7D,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,IAAI,mBAAmB,CAAC,CAAA;QAElE,OAAO,GAAG,CAAA;IACZ,CAAC;IAED;;;;;OAKG;IACI,iBAAiB,CAAC,EAAU,EAAE,KAA6B,EAAE,aAAsB;QACxF,OAAO,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,aAAa,IAAI,mBAAmB,EAAE,CAAC,CAAA;IAC9F,CAAC;CACF;AAtDD,gCAsDC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as wafv2 from 'aws-cdk-lib/aws-wafv2';
|
|
2
|
+
import * as common from '../../common';
|
|
3
|
+
import * as types from '../../types';
|
|
4
|
+
/**
|
|
5
|
+
* @stability stable
|
|
6
|
+
* @category cdk-utils.waf-manager
|
|
7
|
+
* @subcategory Construct
|
|
8
|
+
* @classdesc Provides operations on AWS WAF.
|
|
9
|
+
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
10
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
11
|
+
* @example
|
|
12
|
+
* import * as common from '@gradientedge/cdk-utils'
|
|
13
|
+
*
|
|
14
|
+
* class CustomConstruct extends common.common.CommonConstruct {
|
|
15
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
16
|
+
* super(parent, id, props)
|
|
17
|
+
* this.props = props
|
|
18
|
+
* this.wafManager.createWebAcl('MyWebAcl', this)
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* @see [CDK WAF Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_waf-readme.html}
|
|
23
|
+
*/
|
|
24
|
+
export declare class WafManager {
|
|
25
|
+
/**
|
|
26
|
+
* @summary Method to create an ip set
|
|
27
|
+
* @param {string} id scoped id of the resource
|
|
28
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
29
|
+
* @param {types.WafIPSetProps} props
|
|
30
|
+
*/
|
|
31
|
+
createIpSet(id: string, scope: common.CommonConstruct, props: types.WafIPSetProps): wafv2.CfnIPSet;
|
|
32
|
+
/**
|
|
33
|
+
* @summary Method to create a web acl
|
|
34
|
+
* @param {string} id scoped id of the resource
|
|
35
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
36
|
+
* @param {types.WafWebACLProps} props
|
|
37
|
+
*/
|
|
38
|
+
createWebAcl(id: string, scope: common.CommonConstruct, props: types.WafWebACLProps): wafv2.CfnWebACL;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=waf-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waf-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/waf-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,uBAAuB,CAAA;AAC9C,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AAGpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,UAAU;IACrB;;;;;OAKG;IACI,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,aAAa;IAiBxF;;;;;OAKG;IACI,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,cAAc;CAkB3F"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.WafManager = void 0;
|
|
23
|
+
const wafv2 = __importStar(require("aws-cdk-lib/aws-wafv2"));
|
|
24
|
+
const utils = __importStar(require("../../utils"));
|
|
25
|
+
/**
|
|
26
|
+
* @stability stable
|
|
27
|
+
* @category cdk-utils.waf-manager
|
|
28
|
+
* @subcategory Construct
|
|
29
|
+
* @classdesc Provides operations on AWS WAF.
|
|
30
|
+
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
31
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
32
|
+
* @example
|
|
33
|
+
* import * as common from '@gradientedge/cdk-utils'
|
|
34
|
+
*
|
|
35
|
+
* class CustomConstruct extends common.common.CommonConstruct {
|
|
36
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
37
|
+
* super(parent, id, props)
|
|
38
|
+
* this.props = props
|
|
39
|
+
* this.wafManager.createWebAcl('MyWebAcl', this)
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
*
|
|
43
|
+
* @see [CDK WAF Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_waf-readme.html}
|
|
44
|
+
*/
|
|
45
|
+
class WafManager {
|
|
46
|
+
/**
|
|
47
|
+
* @summary Method to create an ip set
|
|
48
|
+
* @param {string} id scoped id of the resource
|
|
49
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
50
|
+
* @param {types.WafIPSetProps} props
|
|
51
|
+
*/
|
|
52
|
+
createIpSet(id, scope, props) {
|
|
53
|
+
if (!props)
|
|
54
|
+
throw `WAF Ip Set props undefined`;
|
|
55
|
+
const ipSet = new wafv2.CfnIPSet(scope, `${id}`, {
|
|
56
|
+
name: scope.isProductionStage() ? props.name : `${props.name}-${scope.props.stage}`,
|
|
57
|
+
description: `IP Set for ${id} - ${scope.props.stage} stage`,
|
|
58
|
+
addresses: props.addresses,
|
|
59
|
+
ipAddressVersion: props.ipAddressVersion,
|
|
60
|
+
scope: props.scope,
|
|
61
|
+
});
|
|
62
|
+
utils.createCfnOutput(`${id}-ipSetId`, scope, ipSet.attrId);
|
|
63
|
+
utils.createCfnOutput(`${id}-ipSetArn`, scope, ipSet.attrArn);
|
|
64
|
+
return ipSet;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @summary Method to create a web acl
|
|
68
|
+
* @param {string} id scoped id of the resource
|
|
69
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
70
|
+
* @param {types.WafWebACLProps} props
|
|
71
|
+
*/
|
|
72
|
+
createWebAcl(id, scope, props) {
|
|
73
|
+
if (!props)
|
|
74
|
+
throw `WAF WebACL props undefined`;
|
|
75
|
+
const webAcl = new wafv2.CfnWebACL(scope, `${id}`, {
|
|
76
|
+
name: scope.isProductionStage() ? props.name : `${props.name}-${scope.props.stage}`,
|
|
77
|
+
description: `Web Acl for ${id} - ${scope.props.stage} stage`,
|
|
78
|
+
defaultAction: props.defaultAction,
|
|
79
|
+
scope: props.scope,
|
|
80
|
+
visibilityConfig: props.visibilityConfig,
|
|
81
|
+
rules: props.rules,
|
|
82
|
+
tags: [{ key: 'service', value: scope.props.name }],
|
|
83
|
+
});
|
|
84
|
+
utils.createCfnOutput(`${id}-webAclId`, scope, webAcl.attrId);
|
|
85
|
+
utils.createCfnOutput(`${id}-webAclArn`, scope, webAcl.attrArn);
|
|
86
|
+
return webAcl;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.WafManager = WafManager;
|
|
90
|
+
//# sourceMappingURL=waf-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waf-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/waf-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,6DAA8C;AAG9C,mDAAoC;AAEpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,UAAU;IACrB;;;;;OAKG;IACI,WAAW,CAAC,EAAU,EAAE,KAA6B,EAAE,KAA0B;QACtF,IAAI,CAAC,KAAK;YAAE,MAAM,4BAA4B,CAAA;QAE9C,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YAC/C,IAAI,EAAE,KAAK,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE;YACnF,WAAW,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,QAAQ;YAC5D,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;YACxC,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC,CAAA;QAEF,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;QAC3D,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;QAE7D,OAAO,KAAK,CAAA;IACd,CAAC;IAED;;;;;OAKG;IACI,YAAY,CAAC,EAAU,EAAE,KAA6B,EAAE,KAA2B;QACxF,IAAI,CAAC,KAAK;YAAE,MAAM,4BAA4B,CAAA;QAE9C,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YACjD,IAAI,EAAE,KAAK,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE;YACnF,WAAW,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,QAAQ;YAC7D,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;YACxC,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;SACpD,CAAC,CAAA;QAEF,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;QAC7D,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;QAE/D,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAhDD,gCAgDC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/manager/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./aws"), exports);
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/manager/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAAqB"}
|