@gradientedge/cdk-utils 4.3.2 → 4.4.3
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/README.md +39 -28
- package/api-docs/AcmManager.html +622 -0
- package/api-docs/AcmProps.html +238 -0
- package/api-docs/AlarmProps.html +238 -0
- package/api-docs/AlarmStatusWidgetProps.html +238 -0
- package/api-docs/ApiDestinationEvent.html +297 -0
- package/api-docs/ApiDestinationEventType.html +238 -0
- package/api-docs/ApiDestinedLambda.html +297 -0
- package/api-docs/ApiDestinedLambdaEnvironment.html +238 -0
- package/api-docs/ApiDestinedLambdaType.html +238 -0
- package/api-docs/ApiDestinedRestApi.html +297 -0
- package/api-docs/ApiDestinedRestApiType.html +238 -0
- package/api-docs/ApiManager.html +766 -0
- package/api-docs/ApiToEventBridgeTarget.html +1877 -0
- package/api-docs/ApiToEventBridgeTarget.jpg +0 -0
- package/api-docs/ApiToEventBridgeTargetEventProps.html +238 -0
- package/api-docs/ApiToEventBridgeTargetLambdaProps.html +238 -0
- package/api-docs/ApiToEventBridgeTargetProps.html +238 -0
- package/api-docs/ApiToEventBridgeTargetRestApiProps.html +238 -0
- package/api-docs/AppConfigManager.html +1203 -0
- package/api-docs/AppConfigProps.html +238 -0
- package/api-docs/CloudFrontManager.html +2402 -0
- package/api-docs/CloudFrontProps.html +238 -0
- package/api-docs/CloudTrailManager.html +637 -0
- package/api-docs/CloudTrailProps.html +238 -0
- package/api-docs/CloudWatchManager.html +2986 -0
- package/api-docs/CloudfrontFunctionProps.html +238 -0
- package/api-docs/CodeBuildManager.html +736 -0
- package/api-docs/CommonConstruct.html +1299 -0
- package/api-docs/CommonStack.html +813 -0
- package/api-docs/CommonStackProps.html +238 -0
- package/api-docs/DashboardProps.html +238 -0
- package/api-docs/DistributionProps.html +238 -0
- package/api-docs/DynamodbManager.html +530 -0
- package/api-docs/EcrManager.html +530 -0
- package/api-docs/EcsClusterProps.html +238 -0
- package/api-docs/EcsManager.html +880 -0
- package/api-docs/EcsTaskProps.html +238 -0
- package/api-docs/EksClusterProps.html +238 -0
- package/api-docs/EksManager.html +580 -0
- package/api-docs/EventBusProps.html +238 -0
- package/api-docs/EventManager.html +1454 -0
- package/api-docs/EventRuleProps.html +238 -0
- package/api-docs/GraphQLApiLambda.html +1671 -0
- package/api-docs/GraphQLApiLambda.jpg +0 -0
- package/api-docs/GraphQlApiLambdaEnvironment.html +238 -0
- package/api-docs/GraphQlApiLambdaProps.html +238 -0
- package/api-docs/GraphWidgetProps.html +238 -0
- package/api-docs/HealthCheck.html +238 -0
- package/api-docs/IamManager.html +3821 -0
- package/api-docs/LambdaEdgeProps.html +238 -0
- package/api-docs/LambdaEnvironment.html +238 -0
- package/api-docs/LambdaManager.html +2378 -0
- package/api-docs/LambdaProps.html +238 -0
- package/api-docs/LifecycleRule.html +238 -0
- package/api-docs/LogManager.html +955 -0
- package/api-docs/LogProps.html +238 -0
- package/api-docs/LogQueryWidgetProps.html +238 -0
- package/api-docs/MetricFilterProps.html +238 -0
- package/api-docs/MetricProps.html +238 -0
- package/api-docs/NumericWidgetProps.html +238 -0
- package/api-docs/Route53Manager.html +1460 -0
- package/api-docs/Route53Props.html +238 -0
- package/api-docs/RuleProps.html +238 -0
- package/api-docs/S3BucketProps.html +238 -0
- package/api-docs/S3Manager.html +1546 -0
- package/api-docs/SSMParameterReader.html +431 -0
- package/api-docs/SSMParameterReaderProps.html +238 -0
- package/api-docs/SecretsManager.html +1140 -0
- package/api-docs/SiteWithEcsBackend.html +2391 -0
- package/api-docs/SiteWithEcsBackendProps.html +238 -0
- package/api-docs/SnsManager.html +780 -0
- package/api-docs/SsmManager.html +955 -0
- package/api-docs/StaticSite.html +1358 -0
- package/api-docs/StaticSiteProps.html +238 -0
- package/api-docs/SubscriptionProps.html +238 -0
- package/api-docs/TableProps.html +238 -0
- package/api-docs/TextWidgetProps.html +238 -0
- package/api-docs/VpcManager.html +986 -0
- package/api-docs/WafIPSetProps.html +238 -0
- package/api-docs/WafManager.html +730 -0
- package/api-docs/WafWebACLProps.html +238 -0
- package/api-docs/common_construct.ts.html +279 -0
- package/api-docs/common_stack.ts.html +303 -0
- package/api-docs/construct_api-to-eventbridge-target_api-destination-event.ts.html +175 -0
- package/api-docs/construct_api-to-eventbridge-target_api-destined-lambda.ts.html +178 -0
- package/api-docs/construct_api-to-eventbridge-target_api-destined-rest-api.ts.html +190 -0
- package/api-docs/construct_api-to-eventbridge-target_main.ts.html +751 -0
- package/api-docs/construct_graphql-api-lambda_main.ts.html +408 -0
- package/api-docs/construct_site-with-ecs-backend_main.ts.html +544 -0
- package/api-docs/construct_static-site_main.ts.html +374 -0
- package/api-docs/global.html +1530 -0
- package/api-docs/index.html +208 -0
- package/api-docs/logo.png +0 -0
- package/api-docs/manager_aws_acm-manager.ts.html +236 -0
- package/api-docs/manager_aws_api-manager.ts.html +260 -0
- package/api-docs/manager_aws_app-config-manager.ts.html +310 -0
- package/api-docs/manager_aws_cloudfront-manager.ts.html +491 -0
- package/api-docs/manager_aws_cloudtrail-manager.ts.html +251 -0
- package/api-docs/manager_aws_cloudwatch-manager.ts.html +553 -0
- package/api-docs/manager_aws_codebuild-manager.ts.html +240 -0
- package/api-docs/manager_aws_dynamodb-manager.ts.html +219 -0
- package/api-docs/manager_aws_ecr-manager.ts.html +199 -0
- package/api-docs/manager_aws_ecs-manager.ts.html +259 -0
- package/api-docs/manager_aws_eks-manager.ts.html +260 -0
- package/api-docs/manager_aws_event-manager.ts.html +336 -0
- package/api-docs/manager_aws_iam-manager.ts.html +573 -0
- package/api-docs/manager_aws_lambda-manager.ts.html +400 -0
- package/api-docs/manager_aws_log-manager.ts.html +259 -0
- package/api-docs/manager_aws_route53-manager.ts.html +333 -0
- package/api-docs/manager_aws_s3-manager.ts.html +361 -0
- package/api-docs/manager_aws_secrets-manager.ts.html +274 -0
- package/api-docs/manager_aws_sns-manager.ts.html +246 -0
- package/api-docs/manager_aws_ssm-manager.ts.html +273 -0
- package/api-docs/manager_aws_vpc-manager.ts.html +244 -0
- package/api-docs/manager_aws_waf-manager.ts.html +232 -0
- package/api-docs/scripts/app.min.js +1 -0
- package/api-docs/scripts/linenumber.js +26 -0
- package/api-docs/scripts/search.js +39 -0
- package/api-docs/styles/app.min.css +1 -0
- package/api-docs/styles/iframe.css +13 -0
- package/api-docs/styles/prettify-jsdoc.css +111 -0
- package/api-docs/styles/prettify-tomorrow.css +132 -0
- package/api-docs/styles/reset.css +44 -0
- package/api-docs/styles.css +113 -0
- package/api-docs/tutorial-Architecture.html +151 -0
- package/api-docs/tutorial-Build.html +150 -0
- package/api-docs/tutorial-CI-CD.html +154 -0
- package/api-docs/tutorial-Development.html +227 -0
- package/api-docs/types_aws_index.ts.html +665 -0
- package/api-docs/utils_aws_index.ts.html +192 -0
- package/api-docs/utils_index.ts.html +227 -0
- package/app/api-destined-function/node_modules/.yarn-integrity +180 -0
- package/app/api-destined-function/node_modules/@types/uuid/LICENSE +21 -0
- package/app/api-destined-function/node_modules/@types/uuid/README.md +16 -0
- package/app/api-destined-function/node_modules/@types/uuid/index.d.mts +10 -0
- package/app/api-destined-function/node_modules/@types/uuid/index.d.ts +80 -0
- package/app/api-destined-function/node_modules/@types/uuid/package.json +54 -0
- 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 +923 -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/LICENSE.md +9 -0
- package/app/api-destined-function/node_modules/uuid/README.md +505 -0
- package/app/api-destined-function/node_modules/uuid/package.json +135 -0
- package/app/api-destined-function/node_modules/uuid/wrapper.mjs +10 -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 +29 -0
- package/app/api-destined-function/src/lib/lambda.ts +31 -0
- package/img/ApiToEventBridgeTarget.jpg +0 -0
- package/img/GraphQLApiLambda.jpg +0 -0
- package/img/logo.png +0 -0
- package/package.json +17 -18
- package/src/lib/common/{commonConstruct.ts → construct.ts} +3 -13
- package/src/lib/common/index.ts +2 -2
- package/src/lib/common/{commonStack.ts → stack.ts} +5 -14
- package/src/lib/construct/api-to-eventbridge-target/api-destination-event.ts +17 -0
- package/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.ts +20 -0
- package/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.ts +32 -0
- package/src/lib/construct/api-to-eventbridge-target/index.ts +4 -0
- package/src/lib/construct/api-to-eventbridge-target/main.ts +593 -0
- package/src/lib/construct/graphql-api-lambda/index.ts +1 -0
- package/src/lib/construct/{graphQLApiLambda.ts → graphql-api-lambda/main.ts} +11 -20
- package/src/lib/construct/index.ts +4 -3
- package/src/lib/construct/site-with-ecs-backend/index.ts +1 -0
- package/src/lib/construct/{siteWithEcsBackend.ts → site-with-ecs-backend/main.ts} +6 -17
- package/src/lib/construct/static-site/index.ts +1 -0
- package/src/lib/construct/{staticSite.ts → static-site/main.ts} +5 -16
- package/src/lib/manager/aws/{acmManager.ts → acm-manager.ts} +3 -2
- package/src/lib/manager/aws/{apiManager.ts → api-manager.ts} +6 -5
- package/src/lib/manager/aws/{appConfigManager.ts → app-config-manager.ts} +5 -3
- package/src/lib/manager/aws/{cloudFrontManager.ts → cloudfront-manager.ts} +3 -2
- package/src/lib/manager/aws/{cloudTrailManager.ts → cloudtrail-manager.ts} +3 -2
- package/src/lib/manager/aws/{cloudWatchManager.ts → cloudwatch-manager.ts} +5 -3
- package/src/lib/manager/aws/{codeBuildManager.ts → codebuild-manager.ts} +3 -2
- package/src/lib/manager/aws/{dynamodbManager.ts → dynamodb-manager.ts} +3 -2
- package/src/lib/manager/aws/{ecrManager.ts → ecr-manager.ts} +3 -2
- package/src/lib/manager/aws/{ecsManager.ts → ecs-manager.ts} +3 -2
- package/src/lib/manager/aws/{eksManager.ts → eks-manager.ts} +3 -2
- package/src/lib/manager/aws/{eventManager.ts → event-manager.ts} +57 -2
- package/src/lib/manager/aws/{iamManager.ts → iam-manager.ts} +23 -17
- package/src/lib/manager/aws/index.ts +22 -22
- package/src/lib/manager/aws/{lambdaManager.ts → lambda-manager.ts} +4 -3
- package/src/lib/manager/aws/{logManager.ts → log-manager.ts} +3 -2
- package/src/lib/manager/aws/{route53Manager.ts → route53-manager.ts} +4 -3
- package/src/lib/manager/aws/{s3Manager.ts → s3-manager.ts} +3 -2
- package/src/lib/manager/aws/{secretsManager.ts → secrets-manager.ts} +3 -2
- package/src/lib/manager/aws/{snsManager.ts → sns-manager.ts} +3 -2
- package/src/lib/manager/aws/{ssmManager.ts → ssm-manager.ts} +6 -9
- package/src/lib/manager/aws/{vpcManager.ts → vpc-manager.ts} +8 -5
- package/src/lib/manager/aws/{wafManager.ts → waf-manager.ts} +3 -2
- package/src/lib/types/aws/index.ts +221 -32
- package/src/lib/utils/aws/index.ts +2 -2
- package/src/lib/utils/index.ts +8 -8
- package/theme/styles.css +113 -0
- package/.releaserc +0 -9
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/src/lib/common/commonConstruct.d.ts +0 -90
- package/dist/src/lib/common/commonConstruct.d.ts.map +0 -1
- package/dist/src/lib/common/commonConstruct.js +0 -144
- package/dist/src/lib/common/commonConstruct.js.map +0 -1
- package/dist/src/lib/common/commonStack.d.ts +0 -65
- package/dist/src/lib/common/commonStack.d.ts.map +0 -1
- package/dist/src/lib/common/commonStack.js +0 -158
- package/dist/src/lib/common/commonStack.js.map +0 -1
- package/dist/src/lib/common/index.d.ts +0 -3
- package/dist/src/lib/common/index.d.ts.map +0 -1
- package/dist/src/lib/common/index.js +0 -15
- package/dist/src/lib/common/index.js.map +0 -1
- package/dist/src/lib/construct/graphQLApiLambda.d.ts +0 -122
- package/dist/src/lib/construct/graphQLApiLambda.d.ts.map +0 -1
- package/dist/src/lib/construct/graphQLApiLambda.js +0 -211
- package/dist/src/lib/construct/graphQLApiLambda.js.map +0 -1
- package/dist/src/lib/construct/index.d.ts +0 -4
- package/dist/src/lib/construct/index.d.ts.map +0 -1
- package/dist/src/lib/construct/index.js +0 -16
- package/dist/src/lib/construct/index.js.map +0 -1
- package/dist/src/lib/construct/siteWithEcsBackend.d.ts +0 -179
- package/dist/src/lib/construct/siteWithEcsBackend.d.ts.map +0 -1
- package/dist/src/lib/construct/siteWithEcsBackend.js +0 -339
- package/dist/src/lib/construct/siteWithEcsBackend.js.map +0 -1
- package/dist/src/lib/construct/staticSite.d.ts +0 -106
- package/dist/src/lib/construct/staticSite.d.ts.map +0 -1
- package/dist/src/lib/construct/staticSite.js +0 -180
- package/dist/src/lib/construct/staticSite.js.map +0 -1
- package/dist/src/lib/manager/aws/acmManager.d.ts +0 -46
- package/dist/src/lib/manager/aws/acmManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/acmManager.js +0 -90
- package/dist/src/lib/manager/aws/acmManager.js.map +0 -1
- package/dist/src/lib/manager/aws/apiManager.d.ts +0 -43
- package/dist/src/lib/manager/aws/apiManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/apiManager.js +0 -111
- package/dist/src/lib/manager/aws/apiManager.js.map +0 -1
- package/dist/src/lib/manager/aws/appConfigManager.d.ts +0 -64
- package/dist/src/lib/manager/aws/appConfigManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/appConfigManager.js +0 -147
- package/dist/src/lib/manager/aws/appConfigManager.js.map +0 -1
- package/dist/src/lib/manager/aws/cloudFrontManager.d.ts +0 -112
- package/dist/src/lib/manager/aws/cloudFrontManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/cloudFrontManager.js +0 -282
- package/dist/src/lib/manager/aws/cloudFrontManager.js.map +0 -1
- package/dist/src/lib/manager/aws/cloudTrailManager.d.ts +0 -48
- package/dist/src/lib/manager/aws/cloudTrailManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/cloudTrailManager.js +0 -99
- package/dist/src/lib/manager/aws/cloudTrailManager.js.map +0 -1
- package/dist/src/lib/manager/aws/cloudWatchManager.d.ts +0 -121
- package/dist/src/lib/manager/aws/cloudWatchManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/cloudWatchManager.js +0 -351
- package/dist/src/lib/manager/aws/cloudWatchManager.js.map +0 -1
- package/dist/src/lib/manager/aws/codeBuildManager.d.ts +0 -40
- package/dist/src/lib/manager/aws/codeBuildManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/codeBuildManager.js +0 -94
- package/dist/src/lib/manager/aws/codeBuildManager.js.map +0 -1
- package/dist/src/lib/manager/aws/dynamodbManager.d.ts +0 -32
- package/dist/src/lib/manager/aws/dynamodbManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/dynamodbManager.js +0 -79
- package/dist/src/lib/manager/aws/dynamodbManager.js.map +0 -1
- package/dist/src/lib/manager/aws/ecrManager.d.ts +0 -31
- package/dist/src/lib/manager/aws/ecrManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/ecrManager.js +0 -60
- package/dist/src/lib/manager/aws/ecrManager.js.map +0 -1
- package/dist/src/lib/manager/aws/ecsManager.d.ts +0 -48
- package/dist/src/lib/manager/aws/ecsManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/ecsManager.js +0 -103
- package/dist/src/lib/manager/aws/ecsManager.js.map +0 -1
- package/dist/src/lib/manager/aws/eksManager.d.ts +0 -36
- package/dist/src/lib/manager/aws/eksManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/eksManager.js +0 -109
- package/dist/src/lib/manager/aws/eksManager.js.map +0 -1
- package/dist/src/lib/manager/aws/eventManager.d.ts +0 -51
- package/dist/src/lib/manager/aws/eventManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/eventManager.js +0 -120
- package/dist/src/lib/manager/aws/eventManager.js.map +0 -1
- package/dist/src/lib/manager/aws/iamManager.d.ts +0 -156
- package/dist/src/lib/manager/aws/iamManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/iamManager.js +0 -376
- package/dist/src/lib/manager/aws/iamManager.js.map +0 -1
- package/dist/src/lib/manager/aws/index.d.ts +0 -23
- package/dist/src/lib/manager/aws/index.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/index.js +0 -35
- package/dist/src/lib/manager/aws/index.js.map +0 -1
- package/dist/src/lib/manager/aws/lambdaManager.d.ts +0 -94
- package/dist/src/lib/manager/aws/lambdaManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/lambdaManager.js +0 -196
- package/dist/src/lib/manager/aws/lambdaManager.js.map +0 -1
- package/dist/src/lib/manager/aws/logManager.d.ts +0 -51
- package/dist/src/lib/manager/aws/logManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/logManager.js +0 -108
- package/dist/src/lib/manager/aws/logManager.js.map +0 -1
- package/dist/src/lib/manager/aws/route53Manager.d.ts +0 -68
- package/dist/src/lib/manager/aws/route53Manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/route53Manager.js +0 -158
- package/dist/src/lib/manager/aws/route53Manager.js.map +0 -1
- package/dist/src/lib/manager/aws/s3Manager.d.ts +0 -73
- package/dist/src/lib/manager/aws/s3Manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/s3Manager.js +0 -202
- package/dist/src/lib/manager/aws/s3Manager.js.map +0 -1
- package/dist/src/lib/manager/aws/secretsManager.d.ts +0 -57
- package/dist/src/lib/manager/aws/secretsManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/secretsManager.js +0 -116
- package/dist/src/lib/manager/aws/secretsManager.js.map +0 -1
- package/dist/src/lib/manager/aws/snsManager.d.ts +0 -42
- package/dist/src/lib/manager/aws/snsManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/snsManager.js +0 -90
- package/dist/src/lib/manager/aws/snsManager.js.map +0 -1
- package/dist/src/lib/manager/aws/ssmManager.d.ts +0 -64
- package/dist/src/lib/manager/aws/ssmManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/ssmManager.js +0 -128
- package/dist/src/lib/manager/aws/ssmManager.js.map +0 -1
- package/dist/src/lib/manager/aws/vpcManager.d.ts +0 -44
- package/dist/src/lib/manager/aws/vpcManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/vpcManager.js +0 -92
- package/dist/src/lib/manager/aws/vpcManager.js.map +0 -1
- package/dist/src/lib/manager/aws/wafManager.d.ts +0 -39
- package/dist/src/lib/manager/aws/wafManager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/wafManager.js +0 -89
- package/dist/src/lib/manager/aws/wafManager.js.map +0 -1
- package/dist/src/lib/manager/index.d.ts +0 -2
- package/dist/src/lib/manager/index.d.ts.map +0 -1
- package/dist/src/lib/manager/index.js +0 -14
- package/dist/src/lib/manager/index.js.map +0 -1
- package/dist/src/lib/types/aws/index.d.ts +0 -294
- package/dist/src/lib/types/aws/index.d.ts.map +0 -1
- package/dist/src/lib/types/aws/index.js +0 -3
- package/dist/src/lib/types/aws/index.js.map +0 -1
- package/dist/src/lib/types/index.d.ts +0 -2
- package/dist/src/lib/types/index.d.ts.map +0 -1
- package/dist/src/lib/types/index.js +0 -14
- package/dist/src/lib/types/index.js.map +0 -1
- package/dist/src/lib/utils/aws/index.d.ts +0 -16
- package/dist/src/lib/utils/aws/index.d.ts.map +0 -1
- package/dist/src/lib/utils/aws/index.js +0 -50
- package/dist/src/lib/utils/aws/index.js.map +0 -1
- package/dist/src/lib/utils/index.d.ts +0 -63
- package/dist/src/lib/utils/index.d.ts.map +0 -1
- package/dist/src/lib/utils/index.js +0 -85
- package/dist/src/lib/utils/index.js.map +0 -1
|
@@ -1,211 +0,0 @@
|
|
|
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.GraphQLApiLambda = void 0;
|
|
23
|
-
const apig = __importStar(require("aws-cdk-lib/aws-apigateway"));
|
|
24
|
-
const iam = __importStar(require("aws-cdk-lib/aws-iam"));
|
|
25
|
-
const common_1 = require("../common");
|
|
26
|
-
/**
|
|
27
|
-
* @stability stable
|
|
28
|
-
* @category Constructs
|
|
29
|
-
* @summary Provides a construct to create and deploy a Graphql API as Lambda
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* import { GraphQLApiLambda, GraphQlApiLambdaProps } '@gradientedge/cdk-utils'
|
|
33
|
-
* import { Construct } from 'constructs'
|
|
34
|
-
*
|
|
35
|
-
* class CustomConstruct extends GraphQLApiLambda {
|
|
36
|
-
* constructor(parent: Construct, id: string, props: GraphQlApiLambdaProps) {
|
|
37
|
-
* super(parent, id, props)
|
|
38
|
-
* this.props = props
|
|
39
|
-
* this.id = id
|
|
40
|
-
* this.initResources()
|
|
41
|
-
* }
|
|
42
|
-
* }
|
|
43
|
-
*
|
|
44
|
-
* @mermaid
|
|
45
|
-
* graph LR;
|
|
46
|
-
* A[GraphQLApiLambda]-.->|extends|B(CommonConstruct);
|
|
47
|
-
* B(CommonConstruct)-->|extends|C(Construct);
|
|
48
|
-
* C(Construct)-->|implements|D(IConstruct);
|
|
49
|
-
*/
|
|
50
|
-
class GraphQLApiLambda extends common_1.CommonConstruct {
|
|
51
|
-
/* graphql api props */
|
|
52
|
-
props;
|
|
53
|
-
id;
|
|
54
|
-
/* graphql api resources */
|
|
55
|
-
applicationSecrets;
|
|
56
|
-
graphQLApiLambdaPolicy;
|
|
57
|
-
graphQLApiLambdaRole;
|
|
58
|
-
graphQLApiLambdaEnvironment;
|
|
59
|
-
graphQLApiLambdaLayers = [];
|
|
60
|
-
graphQLApiLambdaFunction;
|
|
61
|
-
graphQLApi;
|
|
62
|
-
graphQLApiHostedZone;
|
|
63
|
-
graphQLApiCertificate;
|
|
64
|
-
graphQLApiDomain;
|
|
65
|
-
graphQLApiBasePathMappings = [];
|
|
66
|
-
/**
|
|
67
|
-
* @summary Constructor to initialise the GraphQLApiLambda Construct
|
|
68
|
-
* @param {Construct} parent
|
|
69
|
-
* @param {string} id
|
|
70
|
-
* @param {GraphQlApiLambdaProps} props
|
|
71
|
-
*/
|
|
72
|
-
constructor(parent, id, props) {
|
|
73
|
-
super(parent, id, props);
|
|
74
|
-
this.props = props;
|
|
75
|
-
this.id = id;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* @summary Initialise and provision resources
|
|
79
|
-
* @protected
|
|
80
|
-
*/
|
|
81
|
-
initResources() {
|
|
82
|
-
this.resolveSecrets();
|
|
83
|
-
this.resolveHostedZone();
|
|
84
|
-
this.resolveCertificate();
|
|
85
|
-
this.createLambdaPolicy();
|
|
86
|
-
this.createLambdaRole();
|
|
87
|
-
this.createLambdaEnvironment();
|
|
88
|
-
this.createLambdaLayers();
|
|
89
|
-
this.createLambdaFunction();
|
|
90
|
-
this.createRestApi();
|
|
91
|
-
this.createApiDomain();
|
|
92
|
-
this.createApiBasePathMapping();
|
|
93
|
-
this.createApiRouteAssets();
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* @summary Method to resolve secrets from SecretsManager
|
|
97
|
-
* - To be implemented in the overriding method in the implementation class
|
|
98
|
-
* @protected
|
|
99
|
-
*/
|
|
100
|
-
resolveSecrets() {
|
|
101
|
-
this.applicationSecrets = [];
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* @summary Method to resolve a hosted zone based on domain attributes
|
|
105
|
-
* @protected
|
|
106
|
-
*/
|
|
107
|
-
resolveHostedZone() {
|
|
108
|
-
this.graphQLApiHostedZone = this.route53Manager.withHostedZoneFromFullyQualifiedDomainName(`${this.id}-hosted-zone`, this, this.props.useExistingHostedZone);
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* @summary Method to resolve a certificate based on attributes
|
|
112
|
-
* @protected
|
|
113
|
-
*/
|
|
114
|
-
resolveCertificate() {
|
|
115
|
-
if (this.props.graphQLApiCertificate.useExistingCertificate &&
|
|
116
|
-
this.props.graphQLApiCertificate.certificateSsmName &&
|
|
117
|
-
this.props.graphQLApiCertificate.certificateRegion) {
|
|
118
|
-
this.props.graphQLApiCertificate.certificateArn = this.ssMManager.readStringParameterFromRegion(`${this.id}-certificate-param`, this, this.props.graphQLApiCertificate.certificateSsmName, this.props.graphQLApiCertificate.certificateRegion);
|
|
119
|
-
}
|
|
120
|
-
this.graphQLApiCertificate = this.acmManager.resolveCertificate(`${this.id}-certificate`, this, this.props.graphQLApiCertificate);
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* @summary Method to create iam policy for GraphQL Lambda function
|
|
124
|
-
* @protected
|
|
125
|
-
*/
|
|
126
|
-
createLambdaPolicy() {
|
|
127
|
-
this.graphQLApiLambdaPolicy = new iam.PolicyDocument({
|
|
128
|
-
statements: [this.iamManager.statementForReadSecrets(this)],
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* @summary Method to create iam role for GraphQL Lambda function
|
|
133
|
-
* @protected
|
|
134
|
-
*/
|
|
135
|
-
createLambdaRole() {
|
|
136
|
-
this.graphQLApiLambdaRole = this.iamManager.createRoleForLambda(`${this.id}-lambda-role`, this, this.graphQLApiLambdaPolicy);
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* @summary Method to create environment variables for GraphQL Lambda function
|
|
140
|
-
* @protected
|
|
141
|
-
*/
|
|
142
|
-
createLambdaEnvironment() {
|
|
143
|
-
this.graphQLApiLambdaEnvironment = {
|
|
144
|
-
NODE_ENV: this.props.nodeEnv,
|
|
145
|
-
LOG_LEVEL: this.props.logLevel,
|
|
146
|
-
TZ: this.props.timezone,
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* @summary Method to create layers for GraphQL Lambda function
|
|
151
|
-
* @protected
|
|
152
|
-
*/
|
|
153
|
-
createLambdaLayers() {
|
|
154
|
-
const layers = [];
|
|
155
|
-
if (!this.props.graphqlApiLambdaLayerSources)
|
|
156
|
-
return;
|
|
157
|
-
this.props.graphqlApiLambdaLayerSources.forEach((source, index) => {
|
|
158
|
-
layers.push(this.lambdaManager.createLambdaLayer(`${this.id}-layer-${index}`, this, source));
|
|
159
|
-
});
|
|
160
|
-
this.graphQLApiLambdaLayers = layers;
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* @summary Method to create lambda function for GraphQL
|
|
164
|
-
* @protected
|
|
165
|
-
*/
|
|
166
|
-
createLambdaFunction() {
|
|
167
|
-
this.graphQLApiLambdaFunction = this.lambdaManager.createLambdaFunction(`${this.id}-graphql-server`, this, this.props.graphqlApi, this.graphQLApiLambdaRole, this.graphQLApiLambdaLayers, this.props.graphQLApiSource, this.props.graphQLApiHandler || 'index.handler', this.graphQLApiLambdaEnvironment);
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* @summary Method to create rest api for GraphQL
|
|
171
|
-
* @protected
|
|
172
|
-
*/
|
|
173
|
-
createRestApi() {
|
|
174
|
-
this.graphQLApi = this.apiManager.createLambdaRestApi(`${this.id}-lambda-rest-api`, this, this.props.graphqlRestApi, this.graphQLApiLambdaFunction);
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* @summary Method to create custom api domain for GraphQL API
|
|
178
|
-
* @protected
|
|
179
|
-
*/
|
|
180
|
-
createApiDomain() {
|
|
181
|
-
this.graphQLApiDomain = this.apiManager.createApiDomain(`${this.id}-api-domain`, this, this.isProductionStage()
|
|
182
|
-
? `${this.props.apiSubDomain}.${this.fullyQualifiedDomainName}`
|
|
183
|
-
: `${this.props.apiSubDomain}-${this.props.stage}.${this.fullyQualifiedDomainName}`, this.graphQLApiCertificate);
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* @summary Method to create base path mappings for GraphQL API
|
|
187
|
-
* @protected
|
|
188
|
-
*/
|
|
189
|
-
createApiBasePathMapping() {
|
|
190
|
-
const apiRootPaths = this.props.apiRootPaths;
|
|
191
|
-
if (apiRootPaths && apiRootPaths.length > 0) {
|
|
192
|
-
apiRootPaths.forEach((apiRootPath) => {
|
|
193
|
-
this.graphQLApiBasePathMappings.push(new apig.BasePathMapping(this, `${this.id}-base-bath-mapping-${apiRootPath}`, {
|
|
194
|
-
basePath: apiRootPath,
|
|
195
|
-
domainName: this.graphQLApiDomain,
|
|
196
|
-
restApi: this.graphQLApi,
|
|
197
|
-
stage: this.graphQLApi.deploymentStage,
|
|
198
|
-
}));
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* @summary Method to create route53 records for GraphQL API
|
|
204
|
-
* @protected
|
|
205
|
-
*/
|
|
206
|
-
createApiRouteAssets() {
|
|
207
|
-
this.route53Manager.createApiGatewayARecord(`${this.id}-custom-domain-a-record`, this, this.props.apiSubDomain, this.graphQLApiDomain, this.graphQLApiHostedZone);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
exports.GraphQLApiLambda = GraphQLApiLambda;
|
|
211
|
-
//# sourceMappingURL=graphQLApiLambda.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graphQLApiLambda.js","sourceRoot":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,yBAAyB,EACnC,IAAI,EACJ,IAAI,CAAC,KAAK,CAAC,YAAY,EACvB,IAAI,CAAC,gBAAgB,EACrB,IAAI,CAAC,oBAAoB,CAC1B,CAAA;IACH,CAAC;CACF;AAhOD,4CAgOC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/construct/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,cAAc,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
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("./graphQLApiLambda"), exports);
|
|
14
|
-
__exportStar(require("./siteWithEcsBackend"), exports);
|
|
15
|
-
__exportStar(require("./staticSite"), exports);
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/construct/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAkC;AAClC,uDAAoC;AACpC,+CAA4B"}
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import * as certificateManager from 'aws-cdk-lib/aws-certificatemanager';
|
|
2
|
-
import * as cloudfront from 'aws-cdk-lib/aws-cloudfront';
|
|
3
|
-
import * as origins from 'aws-cdk-lib/aws-cloudfront-origins';
|
|
4
|
-
import * as ec2 from 'aws-cdk-lib/aws-ec2';
|
|
5
|
-
import * as ecs from 'aws-cdk-lib/aws-ecs';
|
|
6
|
-
import * as elb from 'aws-cdk-lib/aws-elasticloadbalancingv2';
|
|
7
|
-
import * as iam from 'aws-cdk-lib/aws-iam';
|
|
8
|
-
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
9
|
-
import * as route53 from 'aws-cdk-lib/aws-route53';
|
|
10
|
-
import * as s3 from 'aws-cdk-lib/aws-s3';
|
|
11
|
-
import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager';
|
|
12
|
-
import { Construct } from 'constructs';
|
|
13
|
-
import { CommonConstruct } from '../common';
|
|
14
|
-
import { SiteWithEcsBackendProps } from '../types';
|
|
15
|
-
/**
|
|
16
|
-
* @stability stable
|
|
17
|
-
* @category Constructs
|
|
18
|
-
* @summary Provides a construct to create and deploy a site hosted with an clustered ECS/ELB backend
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* import { SiteWithEcsBackend, SiteWithEcsBackendProps } '@gradientedge/cdk-utils'
|
|
22
|
-
* import { Construct } from 'constructs'
|
|
23
|
-
*
|
|
24
|
-
* class CustomConstruct extends SiteWithEcsBackend {
|
|
25
|
-
* constructor(parent: Construct, id: string, props: SiteWithEcsBackendProps) {
|
|
26
|
-
* super(parent, id, props)
|
|
27
|
-
* this.props = props
|
|
28
|
-
* this.id = id
|
|
29
|
-
* this.initResources()
|
|
30
|
-
* }
|
|
31
|
-
* }
|
|
32
|
-
*
|
|
33
|
-
* @mermaid
|
|
34
|
-
* graph LR;
|
|
35
|
-
* A[StaticSite]-.->|extends|B(CommonConstruct);
|
|
36
|
-
* B(CommonConstruct)-->|extends|C(Construct);
|
|
37
|
-
* C(Construct)-->|implements|D(IConstruct);
|
|
38
|
-
*/
|
|
39
|
-
export declare class SiteWithEcsBackend extends CommonConstruct {
|
|
40
|
-
props: SiteWithEcsBackendProps;
|
|
41
|
-
id: string;
|
|
42
|
-
siteHostedZone: route53.IHostedZone;
|
|
43
|
-
siteCertificate: certificateManager.ICertificate;
|
|
44
|
-
siteEcsPolicy: iam.PolicyDocument;
|
|
45
|
-
siteEcsRole: iam.Role;
|
|
46
|
-
siteEcsEnvironment: {
|
|
47
|
-
[key: string]: string;
|
|
48
|
-
};
|
|
49
|
-
siteVpc: ec2.Vpc;
|
|
50
|
-
siteSecrets: any;
|
|
51
|
-
siteEcsCluster: ecs.Cluster;
|
|
52
|
-
siteEcsLogGroup: logs.LogGroup;
|
|
53
|
-
siteEcsBuildArgs: any;
|
|
54
|
-
siteEcsContainerImage: ecs.AssetImage;
|
|
55
|
-
siteEcsService: ecs.FargateService;
|
|
56
|
-
siteEcsTaskDefinition: ecs.FargateTaskDefinition;
|
|
57
|
-
siteEcsListener: elb.ApplicationListener;
|
|
58
|
-
siteEcsLoadBalancer: elb.ApplicationLoadBalancer;
|
|
59
|
-
siteEcsTargetGroup: elb.ApplicationTargetGroup;
|
|
60
|
-
siteLogBucket: s3.IBucket;
|
|
61
|
-
siteOrigin: origins.HttpOrigin;
|
|
62
|
-
siteDistribution: cloudfront.Distribution;
|
|
63
|
-
siteSecretAlgolia: secretsmanager.ISecret;
|
|
64
|
-
siteInternalDomainName: string;
|
|
65
|
-
siteExternalDomainName: string;
|
|
66
|
-
siteDomainNames: string[];
|
|
67
|
-
siteCloudfrontFunction: cloudfront.Function;
|
|
68
|
-
siteFunctionAssociations: cloudfront.FunctionAssociation[];
|
|
69
|
-
/**
|
|
70
|
-
* @summary Constructor to initialise the SiteWithEcsBackend Construct
|
|
71
|
-
* @param {Construct} parent
|
|
72
|
-
* @param {string} id
|
|
73
|
-
* @param {SiteWithEcsBackendProps} props
|
|
74
|
-
*/
|
|
75
|
-
constructor(parent: Construct, id: string, props: SiteWithEcsBackendProps);
|
|
76
|
-
/**
|
|
77
|
-
* @summary Initialise and provision resources
|
|
78
|
-
* @protected
|
|
79
|
-
*/
|
|
80
|
-
protected initResources(): void;
|
|
81
|
-
/**
|
|
82
|
-
* @summary Method to resolve a hosted zone based on domain attributes
|
|
83
|
-
* @protected
|
|
84
|
-
*/
|
|
85
|
-
protected resolveHostedZone(): void;
|
|
86
|
-
/**
|
|
87
|
-
* @summary Method to resolve a certificate based on attributes
|
|
88
|
-
* @protected
|
|
89
|
-
*/
|
|
90
|
-
protected resolveCertificate(): void;
|
|
91
|
-
/**
|
|
92
|
-
* @summary Method to resolve secrets from SecretsManager
|
|
93
|
-
* - To be implemented in the overriding method in the implementation class
|
|
94
|
-
* @protected
|
|
95
|
-
*/
|
|
96
|
-
protected resolveSiteSecrets(): void;
|
|
97
|
-
/**
|
|
98
|
-
* @summary Method to resolve site domain names
|
|
99
|
-
* @protected
|
|
100
|
-
*/
|
|
101
|
-
protected resolveSiteDomainNames(): void;
|
|
102
|
-
/**
|
|
103
|
-
* Create VPC
|
|
104
|
-
* @protected
|
|
105
|
-
*/
|
|
106
|
-
protected createVpc(): void;
|
|
107
|
-
/**
|
|
108
|
-
* @summary Method to create iam policy for ECS Task
|
|
109
|
-
* @protected
|
|
110
|
-
*/
|
|
111
|
-
protected createEcsPolicy(): void;
|
|
112
|
-
/**
|
|
113
|
-
* @summary Method to create iam role for ECS Task
|
|
114
|
-
* @protected
|
|
115
|
-
*/
|
|
116
|
-
protected createEcsRole(): void;
|
|
117
|
-
/**
|
|
118
|
-
* @summary Method to create environment variables used by ECS task
|
|
119
|
-
* @protected
|
|
120
|
-
*/
|
|
121
|
-
protected createEcsEnvironment(): void;
|
|
122
|
-
/**
|
|
123
|
-
* Method to create an ECS cluster
|
|
124
|
-
* @protected
|
|
125
|
-
*/
|
|
126
|
-
protected createEcsCluster(): void;
|
|
127
|
-
/**
|
|
128
|
-
* Method to create log group used by ECS task
|
|
129
|
-
* @protected
|
|
130
|
-
*/
|
|
131
|
-
protected createEcsLogGroup(): void;
|
|
132
|
-
/**
|
|
133
|
-
* Method to create docker build arguments for ECS Image step
|
|
134
|
-
* @protected
|
|
135
|
-
*/
|
|
136
|
-
protected createEcsBuildArgs(): void;
|
|
137
|
-
/**
|
|
138
|
-
* Method to create container image for ECS task
|
|
139
|
-
* @protected
|
|
140
|
-
*/
|
|
141
|
-
protected createEcsContainerImage(): void;
|
|
142
|
-
/**
|
|
143
|
-
* Method to create Application Loadbalanced ECS Fargate Service
|
|
144
|
-
* @protected
|
|
145
|
-
*/
|
|
146
|
-
protected createEcsService(): void;
|
|
147
|
-
/**
|
|
148
|
-
* Method to create log bucket for site distribution
|
|
149
|
-
* @protected
|
|
150
|
-
*/
|
|
151
|
-
protected createSiteLogBucket(): void;
|
|
152
|
-
protected createSiteOrigin(): void;
|
|
153
|
-
/**
|
|
154
|
-
* @summary Method to create a site cloudfront function
|
|
155
|
-
* @protected
|
|
156
|
-
*/
|
|
157
|
-
protected createSiteCloudfrontFunction(): void;
|
|
158
|
-
/**
|
|
159
|
-
* @summary Method to create a site cloudfront function associations
|
|
160
|
-
* @protected
|
|
161
|
-
*/
|
|
162
|
-
protected resolveSiteFunctionAssociations(): void;
|
|
163
|
-
/**
|
|
164
|
-
* Method to create Site distribution
|
|
165
|
-
* @protected
|
|
166
|
-
*/
|
|
167
|
-
protected createDistribution(): void;
|
|
168
|
-
/**
|
|
169
|
-
* Method to create Route53 records for distribution
|
|
170
|
-
* @protected
|
|
171
|
-
*/
|
|
172
|
-
protected createNetworkMappings(): void;
|
|
173
|
-
/**
|
|
174
|
-
* Method to invalidation the cloudfront distribution cache after a deployment
|
|
175
|
-
* @protected
|
|
176
|
-
*/
|
|
177
|
-
protected invalidateDistributionCache(): void;
|
|
178
|
-
}
|
|
179
|
-
//# sourceMappingURL=siteWithEcsBackend.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"siteWithEcsBackend.d.ts","sourceRoot":"","sources":["../../../../src/lib/construct/siteWithEcsBackend.ts"],"names":[],"m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