@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,32 @@
|
|
|
1
|
+
import * as ecr from 'aws-cdk-lib/aws-ecr-assets';
|
|
2
|
+
import * as common from '../../common';
|
|
3
|
+
/**
|
|
4
|
+
* @stability stable
|
|
5
|
+
* @category cdk-utils.ecr-manager
|
|
6
|
+
* @subcategory Construct
|
|
7
|
+
* @classdesc Provides operations on AWS Elastic Container Registry.
|
|
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.ecrManager.createDockerImage('MyImage', this, dockerfilePath)
|
|
18
|
+
* }
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* @see [CDK ECR Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecr-readme.html}
|
|
22
|
+
*/
|
|
23
|
+
export declare class EcrManager {
|
|
24
|
+
/**
|
|
25
|
+
* @summary Method to create a docker image in ecr
|
|
26
|
+
* @param {string} id scoped id of the resource
|
|
27
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
28
|
+
* @param {string} dockerfilePath
|
|
29
|
+
*/
|
|
30
|
+
createDockerImage(id: string, scope: common.CommonConstruct, dockerfilePath: string): ecr.DockerImageAsset;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=ecr-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecr-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/ecr-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,4BAA4B,CAAA;AACjD,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AAGtC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,UAAU;IACrB;;;;;OAKG;IACI,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,cAAc,EAAE,MAAM;CAS3F"}
|
|
@@ -0,0 +1,61 @@
|
|
|
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.EcrManager = void 0;
|
|
23
|
+
const ecr = __importStar(require("aws-cdk-lib/aws-ecr-assets"));
|
|
24
|
+
const utils = __importStar(require("../../utils"));
|
|
25
|
+
/**
|
|
26
|
+
* @stability stable
|
|
27
|
+
* @category cdk-utils.ecr-manager
|
|
28
|
+
* @subcategory Construct
|
|
29
|
+
* @classdesc Provides operations on AWS Elastic Container Registry.
|
|
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.ecrManager.createDockerImage('MyImage', this, dockerfilePath)
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
*
|
|
43
|
+
* @see [CDK ECR Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecr-readme.html}
|
|
44
|
+
*/
|
|
45
|
+
class EcrManager {
|
|
46
|
+
/**
|
|
47
|
+
* @summary Method to create a docker image in ecr
|
|
48
|
+
* @param {string} id scoped id of the resource
|
|
49
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
50
|
+
* @param {string} dockerfilePath
|
|
51
|
+
*/
|
|
52
|
+
createDockerImage(id, scope, dockerfilePath) {
|
|
53
|
+
const asset = new ecr.DockerImageAsset(scope, `${id}`, {
|
|
54
|
+
directory: dockerfilePath,
|
|
55
|
+
});
|
|
56
|
+
utils.createCfnOutput(`${id}-dockerImageArn`, scope, asset.imageUri);
|
|
57
|
+
return asset;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.EcrManager = EcrManager;
|
|
61
|
+
//# sourceMappingURL=ecr-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecr-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/ecr-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAiD;AAEjD,mDAAoC;AAEpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,UAAU;IACrB;;;;;OAKG;IACI,iBAAiB,CAAC,EAAU,EAAE,KAA6B,EAAE,cAAsB;QACxF,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,gBAAgB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YACrD,SAAS,EAAE,cAAc;SAC1B,CAAC,CAAA;QAEF,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;QAEpE,OAAO,KAAK,CAAA;IACd,CAAC;CACF;AAhBD,gCAgBC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as ec2 from 'aws-cdk-lib/aws-ec2';
|
|
2
|
+
import * as ecs from 'aws-cdk-lib/aws-ecs';
|
|
3
|
+
import * as iam from 'aws-cdk-lib/aws-iam';
|
|
4
|
+
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
5
|
+
import * as common from '../../common';
|
|
6
|
+
import * as types from '../../types';
|
|
7
|
+
/**
|
|
8
|
+
* @stability stable
|
|
9
|
+
* @category cdk-utils.ecs-manager
|
|
10
|
+
* @subcategory Construct
|
|
11
|
+
* @classdesc Provides operations on AWS Elastic Container Service.
|
|
12
|
+
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
13
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
14
|
+
* @example
|
|
15
|
+
* import * as common from '@gradientedge/cdk-utils'
|
|
16
|
+
*
|
|
17
|
+
* class CustomConstruct extends common.common.CommonConstruct {
|
|
18
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
19
|
+
* super(parent, id, props)
|
|
20
|
+
* this.props = props
|
|
21
|
+
* this.ecsManager.createEcsCluster('MyCluster', this, vpc)
|
|
22
|
+
* }
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* @see [CDK ECS Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs-readme.html}
|
|
26
|
+
*/
|
|
27
|
+
export declare class EcsManager {
|
|
28
|
+
/**
|
|
29
|
+
* @summary Method to create an ecs cluster
|
|
30
|
+
* @param {string} id scoped id of the resource
|
|
31
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
32
|
+
* @param {types.EcsClusterProps} props
|
|
33
|
+
* @param {ec2.IVpc} vpc
|
|
34
|
+
*/
|
|
35
|
+
createEcsCluster(id: string, scope: common.CommonConstruct, props: types.EcsClusterProps, vpc: ec2.IVpc): ecs.Cluster;
|
|
36
|
+
/**
|
|
37
|
+
* @summary Method to create an ecs fargate task
|
|
38
|
+
* @param {string} id scoped id of the resource
|
|
39
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
40
|
+
* @param {types.EcsTaskProps} props
|
|
41
|
+
* @param {ecs.ICluster} cluster
|
|
42
|
+
* @param {iam.Role} role
|
|
43
|
+
* @param {logs.ILogGroup} logGroup
|
|
44
|
+
* @param {ecs.ContainerImage} containerImage
|
|
45
|
+
* @param {Map<string, string>} environment
|
|
46
|
+
*/
|
|
47
|
+
createEcsFargateTask(id: string, scope: common.CommonConstruct, props: types.EcsTaskProps, cluster: ecs.ICluster, role: iam.Role, logGroup: logs.ILogGroup, containerImage: ecs.ContainerImage, environment?: any): ecs.TaskDefinition;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=ecs-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecs-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/ecs-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAA;AAC5C,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AAGpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,UAAU;IACrB;;;;;;OAMG;IACI,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,eAAe,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI;IAc9G;;;;;;;;;;OAUG;IACI,oBAAoB,CACzB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,CAAC,eAAe,EAC7B,KAAK,EAAE,KAAK,CAAC,YAAY,EACzB,OAAO,EAAE,GAAG,CAAC,QAAQ,EACrB,IAAI,EAAE,GAAG,CAAC,IAAI,EACd,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,cAAc,EAAE,GAAG,CAAC,cAAc,EAClC,WAAW,CAAC,EAAE,GAAG;CA+BpB"}
|
|
@@ -0,0 +1,104 @@
|
|
|
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.EcsManager = void 0;
|
|
23
|
+
const ecs = __importStar(require("aws-cdk-lib/aws-ecs"));
|
|
24
|
+
const utils = __importStar(require("../../utils"));
|
|
25
|
+
/**
|
|
26
|
+
* @stability stable
|
|
27
|
+
* @category cdk-utils.ecs-manager
|
|
28
|
+
* @subcategory Construct
|
|
29
|
+
* @classdesc Provides operations on AWS Elastic Container Service.
|
|
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.ecsManager.createEcsCluster('MyCluster', this, vpc)
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
*
|
|
43
|
+
* @see [CDK ECS Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs-readme.html}
|
|
44
|
+
*/
|
|
45
|
+
class EcsManager {
|
|
46
|
+
/**
|
|
47
|
+
* @summary Method to create an ecs cluster
|
|
48
|
+
* @param {string} id scoped id of the resource
|
|
49
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
50
|
+
* @param {types.EcsClusterProps} props
|
|
51
|
+
* @param {ec2.IVpc} vpc
|
|
52
|
+
*/
|
|
53
|
+
createEcsCluster(id, scope, props, vpc) {
|
|
54
|
+
if (!props)
|
|
55
|
+
throw `Ecs Cluster props undefined`;
|
|
56
|
+
const ecsCluster = new ecs.Cluster(scope, `${id}`, {
|
|
57
|
+
clusterName: `${props.clusterName}-${scope.props.stage}`,
|
|
58
|
+
vpc: vpc,
|
|
59
|
+
});
|
|
60
|
+
utils.createCfnOutput(`${id}-clusterArn`, scope, ecsCluster.clusterArn);
|
|
61
|
+
utils.createCfnOutput(`${id}-clusterName`, scope, ecsCluster.clusterName);
|
|
62
|
+
return ecsCluster;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* @summary Method to create an ecs fargate task
|
|
66
|
+
* @param {string} id scoped id of the resource
|
|
67
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
68
|
+
* @param {types.EcsTaskProps} props
|
|
69
|
+
* @param {ecs.ICluster} cluster
|
|
70
|
+
* @param {iam.Role} role
|
|
71
|
+
* @param {logs.ILogGroup} logGroup
|
|
72
|
+
* @param {ecs.ContainerImage} containerImage
|
|
73
|
+
* @param {Map<string, string>} environment
|
|
74
|
+
*/
|
|
75
|
+
createEcsFargateTask(id, scope, props, cluster, role, logGroup, containerImage, environment) {
|
|
76
|
+
if (!props)
|
|
77
|
+
throw `EcsTask props undefined`;
|
|
78
|
+
const ecsTask = new ecs.TaskDefinition(scope, `${id}`, {
|
|
79
|
+
compatibility: ecs.Compatibility.FARGATE,
|
|
80
|
+
cpu: props.cpu,
|
|
81
|
+
executionRole: role,
|
|
82
|
+
family: `${props.family}-${scope.props.stage}`,
|
|
83
|
+
memoryMiB: props.memoryMiB,
|
|
84
|
+
networkMode: ecs.NetworkMode.AWS_VPC,
|
|
85
|
+
taskRole: role,
|
|
86
|
+
});
|
|
87
|
+
ecsTask.addContainer('EcsContainer', {
|
|
88
|
+
cpu: props.cpu ? parseInt(props.cpu) : undefined,
|
|
89
|
+
disableNetworking: false,
|
|
90
|
+
environment: environment,
|
|
91
|
+
image: containerImage,
|
|
92
|
+
logging: ecs.LogDriver.awsLogs({
|
|
93
|
+
logGroup: logGroup,
|
|
94
|
+
streamPrefix: `${id}`,
|
|
95
|
+
}),
|
|
96
|
+
memoryLimitMiB: props.memoryMiB ? parseInt(props.memoryMiB) : undefined,
|
|
97
|
+
privileged: false,
|
|
98
|
+
});
|
|
99
|
+
utils.createCfnOutput(`${id}-taskArn`, scope, ecsTask.taskDefinitionArn);
|
|
100
|
+
return ecsTask;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.EcsManager = EcsManager;
|
|
104
|
+
//# sourceMappingURL=ecs-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecs-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/ecs-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,yDAA0C;AAK1C,mDAAoC;AAEpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,UAAU;IACrB;;;;;;OAMG;IACI,gBAAgB,CAAC,EAAU,EAAE,KAA6B,EAAE,KAA4B,EAAE,GAAa;QAC5G,IAAI,CAAC,KAAK;YAAE,MAAM,6BAA6B,CAAA;QAE/C,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YACjD,WAAW,EAAE,GAAG,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE;YACxD,GAAG,EAAE,GAAG;SACT,CAAC,CAAA;QAEF,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,CAAA;QACvE,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,CAAA;QAEzE,OAAO,UAAU,CAAA;IACnB,CAAC;IAED;;;;;;;;;;OAUG;IACI,oBAAoB,CACzB,EAAU,EACV,KAA6B,EAC7B,KAAyB,EACzB,OAAqB,EACrB,IAAc,EACd,QAAwB,EACxB,cAAkC,EAClC,WAAiB;QAEjB,IAAI,CAAC,KAAK;YAAE,MAAM,yBAAyB,CAAA;QAE3C,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YACrD,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC,OAAO;YACxC,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,aAAa,EAAE,IAAI;YACnB,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE;YAC9C,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,OAAO;YACpC,QAAQ,EAAE,IAAI;SACf,CAAC,CAAA;QAEF,OAAO,CAAC,YAAY,CAAC,cAAc,EAAE;YACnC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;YAChD,iBAAiB,EAAE,KAAK;YACxB,WAAW,EAAE,WAAW;YACxB,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC;gBAC7B,QAAQ,EAAE,QAAQ;gBAClB,YAAY,EAAE,GAAG,EAAE,EAAE;aACtB,CAAC;YACF,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;YACvE,UAAU,EAAE,KAAK;SAClB,CAAC,CAAA;QAEF,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAA;QAExE,OAAO,OAAO,CAAA;IAChB,CAAC;CACF;AAxED,gCAwEC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as ec2 from 'aws-cdk-lib/aws-ec2';
|
|
2
|
+
import * as ecr from 'aws-cdk-lib/aws-ecr-assets';
|
|
3
|
+
import * as eks from 'aws-cdk-lib/aws-eks';
|
|
4
|
+
import * as common from '../../common';
|
|
5
|
+
import * as types from '../../types';
|
|
6
|
+
/**
|
|
7
|
+
* @stability stable
|
|
8
|
+
* @category cdk-utils.eks-manager
|
|
9
|
+
* @subcategory Construct
|
|
10
|
+
* @classdesc Provides operations on AWS Elastic Kubernetes Service.
|
|
11
|
+
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
12
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
13
|
+
* @example
|
|
14
|
+
* import * as common from '@gradientedge/cdk-utils'
|
|
15
|
+
*
|
|
16
|
+
* class CustomConstruct extends common.common.CommonConstruct {
|
|
17
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
18
|
+
* super(parent, id, props)
|
|
19
|
+
* this.props = props
|
|
20
|
+
* this.eksManager.createEksDeployment('MyEksDeployment', this, image, vpc)
|
|
21
|
+
* }
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* @see [CDK EKS Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_eks-readme.html}
|
|
25
|
+
*/
|
|
26
|
+
export declare class EksManager {
|
|
27
|
+
/**
|
|
28
|
+
* @summary Method to create an eks deployment
|
|
29
|
+
* @param {string} id scoped id of the resource
|
|
30
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
31
|
+
* @param {types.EksClusterProps} props
|
|
32
|
+
* @param {ecr.DockerImageAsset} image
|
|
33
|
+
* @param {ec2.IVpc} vpc
|
|
34
|
+
*/
|
|
35
|
+
createEksDeployment(id: string, scope: common.CommonConstruct, props: types.EksClusterProps, image: ecr.DockerImageAsset, vpc: ec2.IVpc): eks.Cluster;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=eks-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eks-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/eks-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,GAAG,MAAM,4BAA4B,CAAA;AACjD,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AAGpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,UAAU;IACrB;;;;;;;OAOG;IACI,mBAAmB,CACxB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,CAAC,eAAe,EAC7B,KAAK,EAAE,KAAK,CAAC,eAAe,EAC5B,KAAK,EAAE,GAAG,CAAC,gBAAgB,EAC3B,GAAG,EAAE,GAAG,CAAC,IAAI;CA4DhB"}
|
|
@@ -0,0 +1,110 @@
|
|
|
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.EksManager = void 0;
|
|
23
|
+
const ec2 = __importStar(require("aws-cdk-lib/aws-ec2"));
|
|
24
|
+
const eks = __importStar(require("aws-cdk-lib/aws-eks"));
|
|
25
|
+
const utils = __importStar(require("../../utils"));
|
|
26
|
+
/**
|
|
27
|
+
* @stability stable
|
|
28
|
+
* @category cdk-utils.eks-manager
|
|
29
|
+
* @subcategory Construct
|
|
30
|
+
* @classdesc Provides operations on AWS Elastic Kubernetes Service.
|
|
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 * as common from '@gradientedge/cdk-utils'
|
|
35
|
+
*
|
|
36
|
+
* class CustomConstruct extends common.common.CommonConstruct {
|
|
37
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
38
|
+
* super(parent, id, props)
|
|
39
|
+
* this.props = props
|
|
40
|
+
* this.eksManager.createEksDeployment('MyEksDeployment', this, image, vpc)
|
|
41
|
+
* }
|
|
42
|
+
* }
|
|
43
|
+
*
|
|
44
|
+
* @see [CDK EKS Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_eks-readme.html}
|
|
45
|
+
*/
|
|
46
|
+
class EksManager {
|
|
47
|
+
/**
|
|
48
|
+
* @summary Method to create an eks deployment
|
|
49
|
+
* @param {string} id scoped id of the resource
|
|
50
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
51
|
+
* @param {types.EksClusterProps} props
|
|
52
|
+
* @param {ecr.DockerImageAsset} image
|
|
53
|
+
* @param {ec2.IVpc} vpc
|
|
54
|
+
*/
|
|
55
|
+
createEksDeployment(id, scope, props, image, vpc) {
|
|
56
|
+
if (!props)
|
|
57
|
+
throw `EksCluster props undefined`;
|
|
58
|
+
const appLabel = { app: `${id}`.toLowerCase() };
|
|
59
|
+
const deployment = {
|
|
60
|
+
apiVersion: 'apps/v1',
|
|
61
|
+
kind: 'Deployment',
|
|
62
|
+
metadata: { name: `${id}`.toLowerCase() },
|
|
63
|
+
spec: {
|
|
64
|
+
selector: { matchLabels: appLabel },
|
|
65
|
+
template: {
|
|
66
|
+
metadata: { labels: appLabel },
|
|
67
|
+
spec: {
|
|
68
|
+
containers: [
|
|
69
|
+
{
|
|
70
|
+
name: `${id}`.toLowerCase(),
|
|
71
|
+
image: image.imageUri,
|
|
72
|
+
ports: [{ containerPort: props.appContainerPort }],
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
const service = {
|
|
80
|
+
apiVersion: 'v1',
|
|
81
|
+
kind: 'Service',
|
|
82
|
+
metadata: { name: `${id}`.toLowerCase() },
|
|
83
|
+
spec: {
|
|
84
|
+
type: 'LoadBalancer',
|
|
85
|
+
ports: [
|
|
86
|
+
{
|
|
87
|
+
name: 'http-port',
|
|
88
|
+
protocol: 'TCP',
|
|
89
|
+
port: 80,
|
|
90
|
+
targetPort: props.appContainerPort,
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
selector: appLabel,
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
const cluster = new eks.Cluster(scope, `${id}Cluster`, {
|
|
97
|
+
clusterName: `${id.toLowerCase()}-${scope.props.stage}`,
|
|
98
|
+
defaultCapacity: props.appCapacity,
|
|
99
|
+
defaultCapacityInstance: ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.LARGE),
|
|
100
|
+
version: eks.KubernetesVersion.V1_18,
|
|
101
|
+
vpc,
|
|
102
|
+
});
|
|
103
|
+
cluster.addManifest(`${id}Pod`, service, deployment);
|
|
104
|
+
utils.createCfnOutput(`${id}-clusterArn`, scope, cluster.clusterArn);
|
|
105
|
+
utils.createCfnOutput(`${id}-clusterEndpoint`, scope, cluster.clusterEndpoint);
|
|
106
|
+
return cluster;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.EksManager = EksManager;
|
|
110
|
+
//# sourceMappingURL=eks-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eks-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/eks-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,yDAA0C;AAE1C,yDAA0C;AAG1C,mDAAoC;AAEpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,UAAU;IACrB;;;;;;;OAOG;IACI,mBAAmB,CACxB,EAAU,EACV,KAA6B,EAC7B,KAA4B,EAC5B,KAA2B,EAC3B,GAAa;QAEb,IAAI,CAAC,KAAK;YAAE,MAAM,4BAA4B,CAAA;QAE9C,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,WAAW,EAAE,EAAE,CAAA;QAE/C,MAAM,UAAU,GAAG;YACjB,UAAU,EAAE,SAAS;YACrB,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,WAAW,EAAE,EAAE;YACzC,IAAI,EAAE;gBACJ,QAAQ,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE;gBACnC,QAAQ,EAAE;oBACR,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;oBAC9B,IAAI,EAAE;wBACJ,UAAU,EAAE;4BACV;gCACE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,WAAW,EAAE;gCAC3B,KAAK,EAAE,KAAK,CAAC,QAAQ;gCACrB,KAAK,EAAE,CAAC,EAAE,aAAa,EAAE,KAAK,CAAC,gBAAgB,EAAE,CAAC;6BACnD;yBACF;qBACF;iBACF;aACF;SACF,CAAA;QAED,MAAM,OAAO,GAAG;YACd,UAAU,EAAE,IAAI;YAChB,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,WAAW,EAAE,EAAE;YACzC,IAAI,EAAE;gBACJ,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,WAAW;wBACjB,QAAQ,EAAE,KAAK;wBACf,IAAI,EAAE,EAAE;wBACR,UAAU,EAAE,KAAK,CAAC,gBAAgB;qBACnC;iBACF;gBACD,QAAQ,EAAE,QAAQ;aACnB;SACF,CAAA;QAED,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE;YACrD,WAAW,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE;YACvD,eAAe,EAAE,KAAK,CAAC,WAAW;YAClC,uBAAuB,EAAE,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,EAAE,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC;YAC1F,OAAO,EAAE,GAAG,CAAC,iBAAiB,CAAC,KAAK;YACpC,GAAG;SACJ,CAAC,CAAA;QAEF,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,CAAA;QAEpD,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA;QACpE,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,kBAAkB,EAAE,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;QAE9E,OAAO,OAAO,CAAA;IAChB,CAAC;CACF;AA1ED,gCA0EC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as elasticache from 'aws-cdk-lib/aws-elasticache';
|
|
2
|
+
import * as common from '../../common';
|
|
3
|
+
import * as types from '../../types';
|
|
4
|
+
/**
|
|
5
|
+
* @stability stable
|
|
6
|
+
* @category cdk-utils.elasticache-manager
|
|
7
|
+
* @subcategory Construct
|
|
8
|
+
* @summary Provides operations on AWS ElastiCache Service.
|
|
9
|
+
* - A new instance of scope 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.elasticacheManager.createElastiCache('MyElastiCache', scope, props)
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* @see [CDK ElastiCache Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticache-readme.html}
|
|
23
|
+
*/
|
|
24
|
+
export declare class ElastiCacheManager {
|
|
25
|
+
/**
|
|
26
|
+
* @summary Method to create an elasticache resource
|
|
27
|
+
* @param {string} id scoped id of the resource
|
|
28
|
+
* @param {common.CommonConstruct} scope scope in which scope resource is defined
|
|
29
|
+
* @param {string[]} subnetIds
|
|
30
|
+
*/
|
|
31
|
+
createElastiCacheSubnetGroup(id: string, scope: common.CommonConstruct, subnetIds: string[]): elasticache.CfnSubnetGroup;
|
|
32
|
+
/**
|
|
33
|
+
* @summary Method to create an elasticache resource
|
|
34
|
+
* @param {string} id scoped id of the resource
|
|
35
|
+
* @param {common.CommonConstruct} scope scope in which scope resource is defined
|
|
36
|
+
* @param {types.ElastiCacheProps} props
|
|
37
|
+
* @param {string[]} subnetIds
|
|
38
|
+
* @param {string[]} securityGroupIds
|
|
39
|
+
* @param {string[]} logDeliveryConfigurations
|
|
40
|
+
*/
|
|
41
|
+
createElastiCache(id: string, scope: common.CommonConstruct, props: types.ElastiCacheProps, subnetIds: string[], securityGroupIds: string[], logDeliveryConfigurations?: any): elasticache.CfnCacheCluster;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=elasticache-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elasticache-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/elasticache-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAA;AAC1D,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AAGpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,kBAAkB;IAC7B;;;;;OAKG;IACI,4BAA4B,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE;IAUlG;;;;;;;;OAQG;IACI,iBAAiB,CACtB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,CAAC,eAAe,EAC7B,KAAK,EAAE,KAAK,CAAC,gBAAgB,EAC7B,SAAS,EAAE,MAAM,EAAE,EACnB,gBAAgB,EAAE,MAAM,EAAE,EAC1B,yBAAyB,CAAC,EAAE,GAAG;CAwClC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
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.ElastiCacheManager = void 0;
|
|
23
|
+
const elasticache = __importStar(require("aws-cdk-lib/aws-elasticache"));
|
|
24
|
+
const utils = __importStar(require("../../utils"));
|
|
25
|
+
/**
|
|
26
|
+
* @stability stable
|
|
27
|
+
* @category cdk-utils.elasticache-manager
|
|
28
|
+
* @subcategory Construct
|
|
29
|
+
* @summary Provides operations on AWS ElastiCache Service.
|
|
30
|
+
* - A new instance of scope 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.elasticacheManager.createElastiCache('MyElastiCache', scope, props)
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
*
|
|
43
|
+
* @see [CDK ElastiCache Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticache-readme.html}
|
|
44
|
+
*/
|
|
45
|
+
class ElastiCacheManager {
|
|
46
|
+
/**
|
|
47
|
+
* @summary Method to create an elasticache resource
|
|
48
|
+
* @param {string} id scoped id of the resource
|
|
49
|
+
* @param {common.CommonConstruct} scope scope in which scope resource is defined
|
|
50
|
+
* @param {string[]} subnetIds
|
|
51
|
+
*/
|
|
52
|
+
createElastiCacheSubnetGroup(id, scope, subnetIds) {
|
|
53
|
+
const elasticacheSubnetGroup = new elasticache.CfnSubnetGroup(scope, `${id}`, {
|
|
54
|
+
cacheSubnetGroupName: `${id}-subnet-group-${scope.props.stage}`,
|
|
55
|
+
subnetIds: subnetIds,
|
|
56
|
+
description: `${id}-subnet-group-${scope.props.stage}`,
|
|
57
|
+
});
|
|
58
|
+
return elasticacheSubnetGroup;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @summary Method to create an elasticache resource
|
|
62
|
+
* @param {string} id scoped id of the resource
|
|
63
|
+
* @param {common.CommonConstruct} scope scope in which scope resource is defined
|
|
64
|
+
* @param {types.ElastiCacheProps} props
|
|
65
|
+
* @param {string[]} subnetIds
|
|
66
|
+
* @param {string[]} securityGroupIds
|
|
67
|
+
* @param {string[]} logDeliveryConfigurations
|
|
68
|
+
*/
|
|
69
|
+
createElastiCache(id, scope, props, subnetIds, securityGroupIds, logDeliveryConfigurations) {
|
|
70
|
+
if (!props)
|
|
71
|
+
throw `ElastiCache props undefined`;
|
|
72
|
+
const subnetGroup = this.createElastiCacheSubnetGroup(`${id}-subnetGroup`, scope, subnetIds);
|
|
73
|
+
const elasticacheCluster = new elasticache.CfnCacheCluster(scope, `${id}`, {
|
|
74
|
+
engine: props.engine,
|
|
75
|
+
engineVersion: props.engineVersion,
|
|
76
|
+
cacheNodeType: props.cacheNodeType,
|
|
77
|
+
numCacheNodes: props.numCacheNodes,
|
|
78
|
+
clusterName: `${id}-${scope.props.stage}`,
|
|
79
|
+
vpcSecurityGroupIds: securityGroupIds,
|
|
80
|
+
cacheSubnetGroupName: subnetGroup.cacheSubnetGroupName,
|
|
81
|
+
azMode: props.azMode,
|
|
82
|
+
preferredAvailabilityZones: props.preferredAvailabilityZones,
|
|
83
|
+
preferredMaintenanceWindow: props.preferredMaintenanceWindow,
|
|
84
|
+
autoMinorVersionUpgrade: props.autoMinorVersionUpgrade,
|
|
85
|
+
cacheParameterGroupName: props.cacheParameterGroupName,
|
|
86
|
+
cacheSecurityGroupNames: props.cacheSecurityGroupNames,
|
|
87
|
+
port: props.port,
|
|
88
|
+
snapshotArns: props.snapshotArns,
|
|
89
|
+
snapshotName: props.snapshotName,
|
|
90
|
+
snapshotRetentionLimit: props.snapshotRetentionLimit,
|
|
91
|
+
snapshotWindow: props.snapshotWindow,
|
|
92
|
+
logDeliveryConfigurations: logDeliveryConfigurations,
|
|
93
|
+
});
|
|
94
|
+
utils.createCfnOutput(`${id}-clusterName`, scope, elasticacheCluster.clusterName);
|
|
95
|
+
utils.createCfnOutput(`${id}-configurationEndpointAddress`, scope, elasticacheCluster.attrConfigurationEndpointAddress);
|
|
96
|
+
utils.createCfnOutput(`${id}-configurationEndpointPort`, scope, elasticacheCluster.attrConfigurationEndpointPort);
|
|
97
|
+
utils.createCfnOutput(`${id}-redisEndpointPort`, scope, elasticacheCluster.attrRedisEndpointPort);
|
|
98
|
+
utils.createCfnOutput(`${id}-redisEndpointAddress`, scope, elasticacheCluster.attrRedisEndpointAddress);
|
|
99
|
+
return elasticacheCluster;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.ElastiCacheManager = ElastiCacheManager;
|
|
103
|
+
//# sourceMappingURL=elasticache-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elasticache-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/elasticache-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,yEAA0D;AAG1D,mDAAoC;AAEpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,kBAAkB;IAC7B;;;;;OAKG;IACI,4BAA4B,CAAC,EAAU,EAAE,KAA6B,EAAE,SAAmB;QAChG,MAAM,sBAAsB,GAAG,IAAI,WAAW,CAAC,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YAC5E,oBAAoB,EAAE,GAAG,EAAE,iBAAiB,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE;YAC/D,SAAS,EAAE,SAAS;YACpB,WAAW,EAAE,GAAG,EAAE,iBAAiB,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE;SACvD,CAAC,CAAA;QAEF,OAAO,sBAAsB,CAAA;IAC/B,CAAC;IAED;;;;;;;;OAQG;IACI,iBAAiB,CACtB,EAAU,EACV,KAA6B,EAC7B,KAA6B,EAC7B,SAAmB,EACnB,gBAA0B,EAC1B,yBAA+B;QAE/B,IAAI,CAAC,KAAK;YAAE,MAAM,6BAA6B,CAAA;QAE/C,MAAM,WAAW,GAAG,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,SAAS,CAAC,CAAA;QAE5F,MAAM,kBAAkB,GAAG,IAAI,WAAW,CAAC,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YACzE,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,WAAW,EAAE,GAAG,EAAE,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE;YACzC,mBAAmB,EAAE,gBAAgB;YACrC,oBAAoB,EAAE,WAAW,CAAC,oBAAoB;YACtD,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,0BAA0B,EAAE,KAAK,CAAC,0BAA0B;YAC5D,0BAA0B,EAAE,KAAK,CAAC,0BAA0B;YAC5D,uBAAuB,EAAE,KAAK,CAAC,uBAAuB;YACtD,uBAAuB,EAAE,KAAK,CAAC,uBAAuB;YACtD,uBAAuB,EAAE,KAAK,CAAC,uBAAuB;YACtD,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,sBAAsB,EAAE,KAAK,CAAC,sBAAsB;YACpD,cAAc,EAAE,KAAK,CAAC,cAAc;YACpC,yBAAyB,EAAE,yBAAyB;SACrD,CAAC,CAAA;QAEF,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAA;QACjF,KAAK,CAAC,eAAe,CACnB,GAAG,EAAE,+BAA+B,EACpC,KAAK,EACL,kBAAkB,CAAC,gCAAgC,CACpD,CAAA;QACD,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,4BAA4B,EAAE,KAAK,EAAE,kBAAkB,CAAC,6BAA6B,CAAC,CAAA;QACjH,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE,kBAAkB,CAAC,qBAAqB,CAAC,CAAA;QACjG,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,uBAAuB,EAAE,KAAK,EAAE,kBAAkB,CAAC,wBAAwB,CAAC,CAAA;QAEvG,OAAO,kBAAkB,CAAA;IAC3B,CAAC;CACF;AAxED,gDAwEC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as ecs from 'aws-cdk-lib/aws-ecs';
|
|
2
|
+
import * as events from 'aws-cdk-lib/aws-events';
|
|
3
|
+
import * as iam from 'aws-cdk-lib/aws-iam';
|
|
4
|
+
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
5
|
+
import * as common from '../../common';
|
|
6
|
+
import * as types from '../../types';
|
|
7
|
+
/**
|
|
8
|
+
* @stability stable
|
|
9
|
+
* @category cdk-utils.event-manager
|
|
10
|
+
* @subcategory Construct
|
|
11
|
+
* @classdesc Provides operations on AWS EventBridge.
|
|
12
|
+
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
13
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
14
|
+
* @example
|
|
15
|
+
* import * as common from '@gradientedge/cdk-utils'
|
|
16
|
+
*
|
|
17
|
+
* class CustomConstruct extends common.common.CommonConstruct {
|
|
18
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
19
|
+
* super(parent, id, props)
|
|
20
|
+
* this.props = props
|
|
21
|
+
* this.eventManager.createLambdaRule('MyLambdaRule', this, lambdaFunction)
|
|
22
|
+
* }
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* @see [CDK EventBridge Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events-readme.html}
|
|
26
|
+
*/
|
|
27
|
+
export declare class EventManager {
|
|
28
|
+
/**
|
|
29
|
+
* Method to create an event bus
|
|
30
|
+
* @param {string} id scoped id of the resource
|
|
31
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
32
|
+
* @param {types.EventBusProps} props event bus properties
|
|
33
|
+
*/
|
|
34
|
+
createEventBus(id: string, scope: common.CommonConstruct, props: types.EventBusProps): events.EventBus;
|
|
35
|
+
/**
|
|
36
|
+
* Method to create an event rule
|
|
37
|
+
* @param {string} id scoped id of the resource
|
|
38
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
39
|
+
* @param {types.EventRuleProps} props event rule properties
|
|
40
|
+
* @param {events.IEventBus?} eventBus optional custom event bus
|
|
41
|
+
* @param {events.IRuleTarget[]?} targets optional event targets
|
|
42
|
+
*/
|
|
43
|
+
createRule(id: string, scope: common.CommonConstruct, props: types.EventRuleProps, eventBus?: events.IEventBus, targets?: events.IRuleTarget[]): events.Rule;
|
|
44
|
+
/**
|
|
45
|
+
* @summary Method to create an eventbridge rule with lambda target
|
|
46
|
+
* @param {string} id scoped id of the resource
|
|
47
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
48
|
+
* @param {types.RuleProps} props
|
|
49
|
+
* @param {lambda.Function} lambdaFunction
|
|
50
|
+
* @param {string} eventBusName
|
|
51
|
+
* @param {any} eventPattern
|
|
52
|
+
* @param {string} scheduleExpression
|
|
53
|
+
*/
|
|
54
|
+
createLambdaRule(id: string, scope: common.CommonConstruct, props: types.RuleProps, lambdaFunction: lambda.Function, eventBusName?: string, eventPattern?: any, scheduleExpression?: string): events.CfnRule;
|
|
55
|
+
/**
|
|
56
|
+
* @summary Method to create an eventbridge rule with fargate task target
|
|
57
|
+
* @param {string} id scoped id of the resource
|
|
58
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
59
|
+
* @param {types.RuleProps} props
|
|
60
|
+
* @param {ecs.ICluster} cluster
|
|
61
|
+
* @param {ecs.ITaskDefinition} task
|
|
62
|
+
* @param {string[]} subnetIds
|
|
63
|
+
* @param {iam.Role | iam.CfnRole} role
|
|
64
|
+
* @param {any} eventPattern
|
|
65
|
+
*/
|
|
66
|
+
createFargateTaskRule(id: string, scope: common.CommonConstruct, props: types.RuleProps, cluster: ecs.ICluster, task: ecs.ITaskDefinition, subnetIds: string[], role: iam.Role | iam.CfnRole, eventPattern?: any): events.CfnRule;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=event-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/event-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAA;AAChD,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAA;AAChD,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AAGpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,YAAY;IACvB;;;;;OAKG;IACI,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,aAAa;IAa3F;;;;;;;OAOG;IACI,UAAU,CACf,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,CAAC,eAAe,EAC7B,KAAK,EAAE,KAAK,CAAC,cAAc,EAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC,SAAS,EAC3B,OAAO,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE;IAsBhC;;;;;;;;;OASG;IACI,gBAAgB,CACrB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,CAAC,eAAe,EAC7B,KAAK,EAAE,KAAK,CAAC,SAAS,EACtB,cAAc,EAAE,MAAM,CAAC,QAAQ,EAC/B,YAAY,CAAC,EAAE,MAAM,EACrB,YAAY,CAAC,EAAE,GAAG,EAClB,kBAAkB,CAAC,EAAE,MAAM;IA2B7B;;;;;;;;;;OAUG;IACI,qBAAqB,CAC1B,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,CAAC,eAAe,EAC7B,KAAK,EAAE,KAAK,CAAC,SAAS,EACtB,OAAO,EAAE,GAAG,CAAC,QAAQ,EACrB,IAAI,EAAE,GAAG,CAAC,eAAe,EACzB,SAAS,EAAE,MAAM,EAAE,EACnB,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,OAAO,EAC5B,YAAY,CAAC,EAAE,GAAG;CA+BrB"}
|