@gradientedge/cdk-utils 8.120.0 → 8.122.0
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 +2 -1
- package/dist/index.d.ts +1 -5
- package/dist/index.js +1 -5
- package/dist/src/lib/aws/common/construct.d.ts +83 -0
- package/dist/src/lib/aws/common/construct.js +126 -0
- package/dist/src/lib/aws/common/index.d.ts +3 -0
- package/dist/src/lib/aws/common/index.js +19 -0
- package/dist/src/lib/aws/common/stack.d.ts +56 -0
- package/dist/src/lib/aws/common/stack.js +141 -0
- package/dist/src/lib/aws/common/types.d.ts +14 -0
- package/dist/src/lib/aws/index.d.ts +5 -0
- package/dist/src/lib/aws/index.js +21 -0
- package/dist/src/lib/aws/types/index.js +2 -0
- package/dist/src/lib/{utils/aws → aws/utils}/index.d.ts +29 -1
- package/dist/src/lib/{utils/aws → aws/utils}/index.js +32 -1
- package/dist/src/lib/azure/common/construct.d.ts +35 -0
- package/dist/src/lib/azure/common/construct.js +49 -0
- package/dist/src/lib/azure/common/index.d.ts +3 -0
- package/dist/src/lib/azure/common/index.js +19 -0
- package/dist/src/lib/azure/common/stack.d.ts +52 -0
- package/dist/src/lib/azure/common/stack.js +136 -0
- package/dist/src/lib/azure/common/types.d.ts +7 -0
- package/dist/src/lib/azure/common/types.js +2 -0
- package/dist/src/lib/azure/index.d.ts +4 -0
- package/dist/src/lib/azure/index.js +20 -0
- package/dist/src/lib/azure/services/index.d.ts +1 -0
- package/dist/src/lib/azure/services/index.js +17 -0
- package/dist/src/lib/azure/services/storage/index.d.ts +2 -0
- package/dist/src/lib/azure/services/storage/index.js +18 -0
- package/dist/src/lib/azure/services/storage/main.d.ts +43 -0
- package/dist/src/lib/azure/services/storage/main.js +124 -0
- package/dist/src/lib/azure/services/storage/types.d.ts +10 -0
- package/dist/src/lib/azure/services/storage/types.js +2 -0
- package/dist/src/lib/azure/types/index.d.ts +3 -0
- package/dist/src/lib/azure/types/index.js +2 -0
- package/dist/src/lib/azure/utils/index.d.ts +3 -0
- package/dist/src/lib/azure/utils/index.js +20 -0
- package/dist/src/lib/common/construct.d.ts +8 -63
- package/dist/src/lib/common/construct.js +3 -128
- package/dist/src/lib/common/index.d.ts +2 -0
- package/dist/src/lib/common/index.js +10 -0
- package/dist/src/lib/common/stack.d.ts +11 -46
- package/dist/src/lib/common/stack.js +4 -137
- package/dist/src/lib/common/types.d.ts +5 -16
- package/dist/src/lib/common/utils.d.ts +26 -0
- package/dist/src/lib/common/utils.js +34 -0
- package/dist/src/lib/index.d.ts +2 -4
- package/dist/src/lib/index.js +2 -4
- package/index.ts +1 -5
- package/package.json +3 -1
- package/setup.js +2 -0
- package/src/lib/aws/common/construct.ts +164 -0
- package/src/lib/aws/common/index.ts +3 -0
- package/src/lib/aws/common/stack.ts +150 -0
- package/src/lib/aws/common/types.ts +15 -0
- package/src/lib/aws/index.ts +5 -0
- package/src/lib/{utils/aws → aws/utils}/index.ts +33 -1
- package/src/lib/azure/common/construct.ts +57 -0
- package/src/lib/azure/common/index.ts +3 -0
- package/src/lib/azure/common/stack.ts +145 -0
- package/src/lib/azure/common/types.ts +8 -0
- package/src/lib/azure/index.ts +4 -0
- package/src/lib/azure/services/index.ts +1 -0
- package/src/lib/azure/services/storage/index.ts +2 -0
- package/src/lib/azure/services/storage/main.ts +134 -0
- package/src/lib/azure/services/storage/types.ts +10 -0
- package/src/lib/azure/types/index.ts +3 -0
- package/src/lib/azure/utils/index.ts +23 -0
- package/src/lib/common/construct.ts +8 -148
- package/src/lib/common/index.ts +13 -0
- package/src/lib/common/stack.ts +11 -135
- package/src/lib/common/types.ts +5 -17
- package/src/lib/common/utils.ts +27 -0
- package/src/lib/index.ts +2 -4
- package/dist/src/lib/types/index.d.ts +0 -1
- package/dist/src/lib/types/index.js +0 -17
- package/dist/src/lib/utils/index.d.ts +0 -55
- package/dist/src/lib/utils/index.js +0 -80
- package/src/lib/types/index.ts +0 -1
- package/src/lib/utils/index.ts +0 -61
- /package/dist/src/lib/{construct/api-to-any-target → aws/common}/types.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-any-target/index.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-any-target/index.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-any-target/main.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-any-target/main.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-any-target/target.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-any-target/target.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-any-target/types.d.ts +0 -0
- /package/dist/src/lib/{construct/api-to-eventbridge-target-with-sns → aws/construct/api-to-any-target}/types.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target/api.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target/api.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target/event.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target/event.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target/index.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target/index.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target/main.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target/main.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target/types.d.ts +0 -0
- /package/dist/src/lib/{construct/api-to-lambda-target → aws/construct/api-to-eventbridge-target}/types.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target-with-sns/api-destined-lambda.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target-with-sns/index.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target-with-sns/index.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target-with-sns/main.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target-with-sns/main.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-eventbridge-target-with-sns/types.d.ts +0 -0
- /package/dist/src/lib/{construct/api-to-eventbridge-target → aws/construct/api-to-eventbridge-target-with-sns}/types.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-lambda-target/api.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-lambda-target/api.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-lambda-target/index.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-lambda-target/index.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-lambda-target/main.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-lambda-target/main.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/api-to-lambda-target/types.d.ts +0 -0
- /package/dist/src/lib/{construct/application-configuration → aws/construct/api-to-lambda-target}/types.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/application-configuration/index.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/application-configuration/index.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/application-configuration/main.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/application-configuration/main.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/application-configuration/types.d.ts +0 -0
- /package/dist/src/lib/{construct/graphql-api-lambda-with-cache → aws/construct/application-configuration}/types.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/graphql-api-lambda/index.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/graphql-api-lambda/index.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/graphql-api-lambda/main.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/graphql-api-lambda/main.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/graphql-api-lambda/types.d.ts +0 -0
- /package/dist/src/lib/{construct/lambda-with-iam-access → aws/construct/graphql-api-lambda}/types.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/graphql-api-lambda-with-cache/index.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/graphql-api-lambda-with-cache/index.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/graphql-api-lambda-with-cache/main.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/graphql-api-lambda-with-cache/main.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/graphql-api-lambda-with-cache/types.d.ts +0 -0
- /package/dist/src/lib/{construct/graphql-api-lambda → aws/construct/graphql-api-lambda-with-cache}/types.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/index.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/index.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/lambda-with-iam-access/index.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/lambda-with-iam-access/index.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/lambda-with-iam-access/main.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/lambda-with-iam-access/main.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/lambda-with-iam-access/types.d.ts +0 -0
- /package/dist/src/lib/{construct/rest-api-lambda-with-cache → aws/construct/lambda-with-iam-access}/types.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/rest-api-lambda/index.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/rest-api-lambda/index.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/rest-api-lambda/main.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/rest-api-lambda/main.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/rest-api-lambda/types.d.ts +0 -0
- /package/dist/src/lib/{construct/site-with-ecs-backend → aws/construct/rest-api-lambda}/types.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/rest-api-lambda-with-cache/index.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/rest-api-lambda-with-cache/index.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/rest-api-lambda-with-cache/main.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/rest-api-lambda-with-cache/main.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/rest-api-lambda-with-cache/types.d.ts +0 -0
- /package/dist/src/lib/{construct/rest-api-lambda → aws/construct/rest-api-lambda-with-cache}/types.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/site-with-ecs-backend/constants.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/site-with-ecs-backend/constants.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/site-with-ecs-backend/index.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/site-with-ecs-backend/index.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/site-with-ecs-backend/main.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/site-with-ecs-backend/main.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/site-with-ecs-backend/types.d.ts +0 -0
- /package/dist/src/lib/{construct/static-asset-deployment → aws/construct/site-with-ecs-backend}/types.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/static-asset-deployment/index.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/static-asset-deployment/index.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/static-asset-deployment/main.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/static-asset-deployment/main.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/static-asset-deployment/types.d.ts +0 -0
- /package/dist/src/lib/{construct/static-site → aws/construct/static-asset-deployment}/types.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/static-site/index.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/static-site/index.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/static-site/main.d.ts +0 -0
- /package/dist/src/lib/{construct → aws/construct}/static-site/main.js +0 -0
- /package/dist/src/lib/{construct → aws/construct}/static-site/types.d.ts +0 -0
- /package/dist/src/lib/{services/api-gateway → aws/construct/static-site}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/api-gateway/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/api-gateway/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/api-gateway/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/api-gateway/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/api-gateway/types.d.ts +0 -0
- /package/dist/src/lib/{services/appconfig → aws/services/api-gateway}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/appconfig/constants.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/appconfig/constants.js +0 -0
- /package/dist/src/lib/{services → aws/services}/appconfig/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/appconfig/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/appconfig/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/appconfig/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/appconfig/types.d.ts +0 -0
- /package/dist/src/lib/{services/certificate-manager → aws/services/appconfig}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/certificate-manager/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/certificate-manager/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/certificate-manager/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/certificate-manager/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/certificate-manager/types.d.ts +0 -0
- /package/dist/src/lib/{services/cloudfront → aws/services/certificate-manager}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudfront/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudfront/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudfront/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudfront/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudfront/types.d.ts +0 -0
- /package/dist/src/lib/{services/cloudtrail → aws/services/cloudfront}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudtrail/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudtrail/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudtrail/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudtrail/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudtrail/types.d.ts +0 -0
- /package/dist/src/lib/{services/cloudwatch → aws/services/cloudtrail}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudwatch/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudwatch/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudwatch/logs.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudwatch/logs.js +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudwatch/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudwatch/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/cloudwatch/types.d.ts +0 -0
- /package/dist/src/lib/{services/dynamodb → aws/services/cloudwatch}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/codebuild/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/codebuild/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/codebuild/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/codebuild/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/constants.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/constants.js +0 -0
- /package/dist/src/lib/{services → aws/services}/dynamodb/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/dynamodb/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/dynamodb/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/dynamodb/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/dynamodb/types.d.ts +0 -0
- /package/dist/src/lib/{services/elastic-container-service → aws/services/dynamodb}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-container-registry/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-container-registry/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-container-registry/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-container-registry/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-container-service/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-container-service/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-container-service/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-container-service/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-container-service/types.d.ts +0 -0
- /package/dist/src/lib/{services/elastic-file-system → aws/services/elastic-container-service}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-file-system/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-file-system/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-file-system/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-file-system/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-file-system/types.d.ts +0 -0
- /package/dist/src/lib/{services/elastic-kubernetes-service → aws/services/elastic-file-system}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-kubernetes-service/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-kubernetes-service/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-kubernetes-service/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-kubernetes-service/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/elastic-kubernetes-service/types.d.ts +0 -0
- /package/dist/src/lib/{services/elasticache → aws/services/elastic-kubernetes-service}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/elasticache/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/elasticache/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/elasticache/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/elasticache/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/elasticache/types.d.ts +0 -0
- /package/dist/src/lib/{services/eventbridge → aws/services/elasticache}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/eventbridge/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/eventbridge/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/eventbridge/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/eventbridge/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/eventbridge/target.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/eventbridge/target.js +0 -0
- /package/dist/src/lib/{services → aws/services}/eventbridge/types.d.ts +0 -0
- /package/dist/src/lib/{services/evidently → aws/services/eventbridge}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/evidently/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/evidently/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/evidently/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/evidently/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/evidently/types.d.ts +0 -0
- /package/dist/src/lib/{services/key-management-service → aws/services/evidently}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/identity-access-management/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/identity-access-management/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/identity-access-management/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/identity-access-management/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/key-management-service/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/key-management-service/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/key-management-service/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/key-management-service/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/key-management-service/types.d.ts +0 -0
- /package/dist/src/lib/{services/lambda → aws/services/key-management-service}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/lambda/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/lambda/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/lambda/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/lambda/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/lambda/types.d.ts +0 -0
- /package/dist/src/lib/{services/route53 → aws/services/lambda}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/route53/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/route53/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/route53/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/route53/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/route53/types.d.ts +0 -0
- /package/dist/src/lib/{services/simple-notification-service → aws/services/route53}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/secrets-manager/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/secrets-manager/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/secrets-manager/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/secrets-manager/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/simple-notification-service/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/simple-notification-service/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/simple-notification-service/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/simple-notification-service/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/simple-notification-service/types.d.ts +0 -0
- /package/dist/src/lib/{services/simple-queue-service → aws/services/simple-notification-service}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/simple-queue-service/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/simple-queue-service/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/simple-queue-service/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/simple-queue-service/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/simple-queue-service/types.d.ts +0 -0
- /package/dist/src/lib/{services/simple-storage-service → aws/services/simple-queue-service}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/simple-storage-service/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/simple-storage-service/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/simple-storage-service/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/simple-storage-service/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/simple-storage-service/types.d.ts +0 -0
- /package/dist/src/lib/{services/step-function → aws/services/simple-storage-service}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/step-function/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/step-function/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/step-function/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/step-function/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/step-function/types.d.ts +0 -0
- /package/dist/src/lib/{services/systems-manager → aws/services/step-function}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/systems-manager/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/systems-manager/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/systems-manager/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/systems-manager/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/systems-manager/types.d.ts +0 -0
- /package/dist/src/lib/{services/web-application-firewall → aws/services/systems-manager}/types.js +0 -0
- /package/dist/src/lib/{services → aws/services}/virtual-private-cloud/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/virtual-private-cloud/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/virtual-private-cloud/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/virtual-private-cloud/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/web-application-firewall/index.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/web-application-firewall/index.js +0 -0
- /package/dist/src/lib/{services → aws/services}/web-application-firewall/main.d.ts +0 -0
- /package/dist/src/lib/{services → aws/services}/web-application-firewall/main.js +0 -0
- /package/dist/src/lib/{services → aws/services}/web-application-firewall/types.d.ts +0 -0
- /package/dist/src/lib/{types/aws/index.js → aws/services/web-application-firewall/types.js} +0 -0
- /package/dist/src/lib/{types/aws → aws/types}/index.d.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-any-target/index.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-any-target/main.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-any-target/target.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-any-target/types.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-eventbridge-target/api.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-eventbridge-target/event.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-eventbridge-target/index.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-eventbridge-target/main.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-eventbridge-target/types.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-eventbridge-target-with-sns/index.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-eventbridge-target-with-sns/main.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-eventbridge-target-with-sns/types.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-lambda-target/api.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-lambda-target/index.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-lambda-target/main.ts +0 -0
- /package/src/lib/{construct → aws/construct}/api-to-lambda-target/types.ts +0 -0
- /package/src/lib/{construct → aws/construct}/application-configuration/index.ts +0 -0
- /package/src/lib/{construct → aws/construct}/application-configuration/main.ts +0 -0
- /package/src/lib/{construct → aws/construct}/application-configuration/types.ts +0 -0
- /package/src/lib/{construct → aws/construct}/graphql-api-lambda/index.ts +0 -0
- /package/src/lib/{construct → aws/construct}/graphql-api-lambda/main.ts +0 -0
- /package/src/lib/{construct → aws/construct}/graphql-api-lambda/types.ts +0 -0
- /package/src/lib/{construct → aws/construct}/graphql-api-lambda-with-cache/index.ts +0 -0
- /package/src/lib/{construct → aws/construct}/graphql-api-lambda-with-cache/main.ts +0 -0
- /package/src/lib/{construct → aws/construct}/graphql-api-lambda-with-cache/types.ts +0 -0
- /package/src/lib/{construct → aws/construct}/index.ts +0 -0
- /package/src/lib/{construct → aws/construct}/lambda-with-iam-access/index.ts +0 -0
- /package/src/lib/{construct → aws/construct}/lambda-with-iam-access/main.ts +0 -0
- /package/src/lib/{construct → aws/construct}/lambda-with-iam-access/types.ts +0 -0
- /package/src/lib/{construct → aws/construct}/rest-api-lambda/index.ts +0 -0
- /package/src/lib/{construct → aws/construct}/rest-api-lambda/main.ts +0 -0
- /package/src/lib/{construct → aws/construct}/rest-api-lambda/types.ts +0 -0
- /package/src/lib/{construct → aws/construct}/rest-api-lambda-with-cache/index.ts +0 -0
- /package/src/lib/{construct → aws/construct}/rest-api-lambda-with-cache/main.ts +0 -0
- /package/src/lib/{construct → aws/construct}/rest-api-lambda-with-cache/types.ts +0 -0
- /package/src/lib/{construct → aws/construct}/site-with-ecs-backend/constants.ts +0 -0
- /package/src/lib/{construct → aws/construct}/site-with-ecs-backend/index.ts +0 -0
- /package/src/lib/{construct → aws/construct}/site-with-ecs-backend/main.ts +0 -0
- /package/src/lib/{construct → aws/construct}/site-with-ecs-backend/types.ts +0 -0
- /package/src/lib/{construct → aws/construct}/static-asset-deployment/index.ts +0 -0
- /package/src/lib/{construct → aws/construct}/static-asset-deployment/main.ts +0 -0
- /package/src/lib/{construct → aws/construct}/static-asset-deployment/types.ts +0 -0
- /package/src/lib/{construct → aws/construct}/static-site/index.ts +0 -0
- /package/src/lib/{construct → aws/construct}/static-site/main.ts +0 -0
- /package/src/lib/{construct → aws/construct}/static-site/types.ts +0 -0
- /package/src/lib/{services → aws/services}/api-gateway/index.ts +0 -0
- /package/src/lib/{services → aws/services}/api-gateway/main.ts +0 -0
- /package/src/lib/{services → aws/services}/api-gateway/types.ts +0 -0
- /package/src/lib/{services → aws/services}/appconfig/constants.ts +0 -0
- /package/src/lib/{services → aws/services}/appconfig/index.ts +0 -0
- /package/src/lib/{services → aws/services}/appconfig/main.ts +0 -0
- /package/src/lib/{services → aws/services}/appconfig/types.ts +0 -0
- /package/src/lib/{services → aws/services}/certificate-manager/index.ts +0 -0
- /package/src/lib/{services → aws/services}/certificate-manager/main.ts +0 -0
- /package/src/lib/{services → aws/services}/certificate-manager/types.ts +0 -0
- /package/src/lib/{services → aws/services}/cloudfront/index.ts +0 -0
- /package/src/lib/{services → aws/services}/cloudfront/main.ts +0 -0
- /package/src/lib/{services → aws/services}/cloudfront/types.ts +0 -0
- /package/src/lib/{services → aws/services}/cloudtrail/index.ts +0 -0
- /package/src/lib/{services → aws/services}/cloudtrail/main.ts +0 -0
- /package/src/lib/{services → aws/services}/cloudtrail/types.ts +0 -0
- /package/src/lib/{services → aws/services}/cloudwatch/index.ts +0 -0
- /package/src/lib/{services → aws/services}/cloudwatch/logs.ts +0 -0
- /package/src/lib/{services → aws/services}/cloudwatch/main.ts +0 -0
- /package/src/lib/{services → aws/services}/cloudwatch/types.ts +0 -0
- /package/src/lib/{services → aws/services}/codebuild/index.ts +0 -0
- /package/src/lib/{services → aws/services}/codebuild/main.ts +0 -0
- /package/src/lib/{services → aws/services}/constants.ts +0 -0
- /package/src/lib/{services → aws/services}/dynamodb/index.ts +0 -0
- /package/src/lib/{services → aws/services}/dynamodb/main.ts +0 -0
- /package/src/lib/{services → aws/services}/dynamodb/types.ts +0 -0
- /package/src/lib/{services → aws/services}/elastic-container-registry/index.ts +0 -0
- /package/src/lib/{services → aws/services}/elastic-container-registry/main.ts +0 -0
- /package/src/lib/{services → aws/services}/elastic-container-service/index.ts +0 -0
- /package/src/lib/{services → aws/services}/elastic-container-service/main.ts +0 -0
- /package/src/lib/{services → aws/services}/elastic-container-service/types.ts +0 -0
- /package/src/lib/{services → aws/services}/elastic-file-system/index.ts +0 -0
- /package/src/lib/{services → aws/services}/elastic-file-system/main.ts +0 -0
- /package/src/lib/{services → aws/services}/elastic-file-system/types.ts +0 -0
- /package/src/lib/{services → aws/services}/elastic-kubernetes-service/index.ts +0 -0
- /package/src/lib/{services → aws/services}/elastic-kubernetes-service/main.ts +0 -0
- /package/src/lib/{services → aws/services}/elastic-kubernetes-service/types.ts +0 -0
- /package/src/lib/{services → aws/services}/elasticache/index.ts +0 -0
- /package/src/lib/{services → aws/services}/elasticache/main.ts +0 -0
- /package/src/lib/{services → aws/services}/elasticache/types.ts +0 -0
- /package/src/lib/{services → aws/services}/eventbridge/index.ts +0 -0
- /package/src/lib/{services → aws/services}/eventbridge/main.ts +0 -0
- /package/src/lib/{services → aws/services}/eventbridge/target.ts +0 -0
- /package/src/lib/{services → aws/services}/eventbridge/types.ts +0 -0
- /package/src/lib/{services → aws/services}/evidently/index.ts +0 -0
- /package/src/lib/{services → aws/services}/evidently/main.ts +0 -0
- /package/src/lib/{services → aws/services}/evidently/types.ts +0 -0
- /package/src/lib/{services → aws/services}/identity-access-management/index.ts +0 -0
- /package/src/lib/{services → aws/services}/identity-access-management/main.ts +0 -0
- /package/src/lib/{services → aws/services}/index.ts +0 -0
- /package/src/lib/{services → aws/services}/key-management-service/index.ts +0 -0
- /package/src/lib/{services → aws/services}/key-management-service/main.ts +0 -0
- /package/src/lib/{services → aws/services}/key-management-service/types.ts +0 -0
- /package/src/lib/{services → aws/services}/lambda/index.ts +0 -0
- /package/src/lib/{services → aws/services}/lambda/main.ts +0 -0
- /package/src/lib/{services → aws/services}/lambda/types.ts +0 -0
- /package/src/lib/{services → aws/services}/route53/index.ts +0 -0
- /package/src/lib/{services → aws/services}/route53/main.ts +0 -0
- /package/src/lib/{services → aws/services}/route53/types.ts +0 -0
- /package/src/lib/{services → aws/services}/secrets-manager/index.ts +0 -0
- /package/src/lib/{services → aws/services}/secrets-manager/main.ts +0 -0
- /package/src/lib/{services → aws/services}/simple-notification-service/index.ts +0 -0
- /package/src/lib/{services → aws/services}/simple-notification-service/main.ts +0 -0
- /package/src/lib/{services → aws/services}/simple-notification-service/types.ts +0 -0
- /package/src/lib/{services → aws/services}/simple-queue-service/index.ts +0 -0
- /package/src/lib/{services → aws/services}/simple-queue-service/main.ts +0 -0
- /package/src/lib/{services → aws/services}/simple-queue-service/types.ts +0 -0
- /package/src/lib/{services → aws/services}/simple-storage-service/index.ts +0 -0
- /package/src/lib/{services → aws/services}/simple-storage-service/main.ts +0 -0
- /package/src/lib/{services → aws/services}/simple-storage-service/types.ts +0 -0
- /package/src/lib/{services → aws/services}/step-function/index.ts +0 -0
- /package/src/lib/{services → aws/services}/step-function/main.ts +0 -0
- /package/src/lib/{services → aws/services}/step-function/types.ts +0 -0
- /package/src/lib/{services → aws/services}/systems-manager/index.ts +0 -0
- /package/src/lib/{services → aws/services}/systems-manager/main.ts +0 -0
- /package/src/lib/{services → aws/services}/systems-manager/types.ts +0 -0
- /package/src/lib/{services → aws/services}/virtual-private-cloud/index.ts +0 -0
- /package/src/lib/{services → aws/services}/virtual-private-cloud/main.ts +0 -0
- /package/src/lib/{services → aws/services}/web-application-firewall/index.ts +0 -0
- /package/src/lib/{services → aws/services}/web-application-firewall/main.ts +0 -0
- /package/src/lib/{services → aws/services}/web-application-firewall/types.ts +0 -0
- /package/src/lib/{types/aws → aws/types}/index.ts +0 -0
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
## Introduction
|
|
27
27
|
|
|
28
|
-
Toolkit for working with
|
|
28
|
+
Toolkit for working with CDK Constructs ([AWS CDK][aws-cdk] & [CDK for Terraform][cdktf]).
|
|
29
29
|
|
|
30
30
|
For more details, see the full [API documentation](https://gradientedge.github.io/cdk-utils/).
|
|
31
31
|
|
|
@@ -65,6 +65,7 @@ pnpm add @gradientedge/cdk-utils
|
|
|
65
65
|
[builds]: https://img.shields.io/github/actions/workflow/status/gradientedge/cdk-utils/ci.yml?branch=main
|
|
66
66
|
[builds-url]: https://github.com/gradientedge/cdk-utils/actions
|
|
67
67
|
[cdk-badge]: https://img.shields.io/github/package-json/dependency-version/gradientedge/cdk-utils/aws-cdk-lib
|
|
68
|
+
[cdktf]: https://developer.hashicorp.com/terraform/cdktf
|
|
68
69
|
[cdk-url]: https://aws.amazon.com/cdk/
|
|
69
70
|
[checks]: https://img.shields.io/github/checks-status/gradientedge/cdk-utils/main
|
|
70
71
|
[cmd]: https://img.shields.io/badge/command--line-4D4D4D?logo=windows-terminal&style=for-the-badge
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -14,8 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./src/lib
|
|
18
|
-
__exportStar(require("./src/lib/construct"), exports);
|
|
19
|
-
__exportStar(require("./src/lib/services"), exports);
|
|
20
|
-
__exportStar(require("./src/lib/types"), exports);
|
|
21
|
-
__exportStar(require("./src/lib/utils"), exports);
|
|
17
|
+
__exportStar(require("./src/lib"), exports);
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { CfnOutput } from 'aws-cdk-lib';
|
|
2
|
+
import { Construct } from 'constructs';
|
|
3
|
+
import { AcmManager, ApiManager, AppConfigManager, CloudFrontManager, CloudTrailManager, CloudWatchManager, CodeBuildManager, DynamodbManager, EcrManager, EcsManager, EfsManager, EksManager, ElastiCacheManager, EventManager, EventTargetManager, EvidentlyManager, IamManager, KmsManager, LambdaManager, LogManager, Route53Manager, S3Manager, SecretsManager, SfnManager, SnsManager, SqsManager, SsmManager, VpcManager, WafManager } from '../services';
|
|
4
|
+
import { CommonStackProps } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* @subcategory Construct
|
|
7
|
+
* @classdesc Common construct to use as a base for all higher level constructs.
|
|
8
|
+
* @example
|
|
9
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils';
|
|
10
|
+
*
|
|
11
|
+
* class CustomConstruct extends CommonConstruct {
|
|
12
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
13
|
+
* super(parent, id, props);
|
|
14
|
+
* this.props = props;
|
|
15
|
+
* };
|
|
16
|
+
* };
|
|
17
|
+
*/
|
|
18
|
+
export declare class CommonConstruct extends Construct {
|
|
19
|
+
props: CommonStackProps;
|
|
20
|
+
acmManager: AcmManager;
|
|
21
|
+
apiManager: ApiManager;
|
|
22
|
+
appConfigManager: AppConfigManager;
|
|
23
|
+
codeBuildManager: CodeBuildManager;
|
|
24
|
+
cloudFrontManager: CloudFrontManager;
|
|
25
|
+
cloudTrailManager: CloudTrailManager;
|
|
26
|
+
cloudWatchManager: CloudWatchManager;
|
|
27
|
+
dynamodbManager: DynamodbManager;
|
|
28
|
+
ecrManager: EcrManager;
|
|
29
|
+
ecsManager: EcsManager;
|
|
30
|
+
efsManager: EfsManager;
|
|
31
|
+
eksManager: EksManager;
|
|
32
|
+
elasticacheManager: ElastiCacheManager;
|
|
33
|
+
eventManager: EventManager;
|
|
34
|
+
eventTargetManager: EventTargetManager;
|
|
35
|
+
evidentlyManager: EvidentlyManager;
|
|
36
|
+
iamManager: IamManager;
|
|
37
|
+
kmsManager: KmsManager;
|
|
38
|
+
lambdaManager: LambdaManager;
|
|
39
|
+
logManager: LogManager;
|
|
40
|
+
route53Manager: Route53Manager;
|
|
41
|
+
s3Manager: S3Manager;
|
|
42
|
+
secretsManager: SecretsManager;
|
|
43
|
+
sfnManager: SfnManager;
|
|
44
|
+
snsManager: SnsManager;
|
|
45
|
+
sqsManager: SqsManager;
|
|
46
|
+
ssmManager: SsmManager;
|
|
47
|
+
vpcManager: VpcManager;
|
|
48
|
+
wafManager: WafManager;
|
|
49
|
+
fullyQualifiedDomainName: string;
|
|
50
|
+
constructor(parent: Construct, id: string, props: CommonStackProps);
|
|
51
|
+
/**
|
|
52
|
+
* @summary Helper method to add CloudFormation outputs from the construct
|
|
53
|
+
* @param id scoped id of the resource
|
|
54
|
+
* @param value the value of the exported output
|
|
55
|
+
* @param description optional description for the output
|
|
56
|
+
* @param overrideId Flag which indicates whether to override the default logical id of the output
|
|
57
|
+
*/
|
|
58
|
+
protected addCfnOutput(id: string, value: string, description?: string, overrideId?: boolean): CfnOutput;
|
|
59
|
+
/**
|
|
60
|
+
* @summary Determine the fully qualified domain name based on domainName & subDomain
|
|
61
|
+
*/
|
|
62
|
+
protected determineFullyQualifiedDomain(): void;
|
|
63
|
+
/**
|
|
64
|
+
* @summary Utility method to determine if the initialisation is in development (dev) stage
|
|
65
|
+
* This is determined by the stage property injected via cdk context
|
|
66
|
+
*/
|
|
67
|
+
isDevelopmentStage: () => boolean;
|
|
68
|
+
/**
|
|
69
|
+
* @summary Utility method to determine if the initialisation is in test (tst) stage
|
|
70
|
+
* This is determined by the stage property injected via cdk context
|
|
71
|
+
*/
|
|
72
|
+
isTestStage: () => boolean;
|
|
73
|
+
/**
|
|
74
|
+
* @summary Utility method to determine if the initialisation is in uat (uat) stage
|
|
75
|
+
* This is determined by the stage property injected via cdk context
|
|
76
|
+
*/
|
|
77
|
+
isUatStage: () => boolean;
|
|
78
|
+
/**
|
|
79
|
+
* @summary Utility method to determine if the initialisation is in production (prd) stage
|
|
80
|
+
* This is determined by the stage property injected via cdk context
|
|
81
|
+
*/
|
|
82
|
+
isProductionStage: () => boolean;
|
|
83
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommonConstruct = void 0;
|
|
4
|
+
const constructs_1 = require("constructs");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
const services_1 = require("../services");
|
|
7
|
+
const utils_1 = require("../utils");
|
|
8
|
+
/**
|
|
9
|
+
* @subcategory Construct
|
|
10
|
+
* @classdesc Common construct to use as a base for all higher level constructs.
|
|
11
|
+
* @example
|
|
12
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils';
|
|
13
|
+
*
|
|
14
|
+
* class CustomConstruct extends CommonConstruct {
|
|
15
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
16
|
+
* super(parent, id, props);
|
|
17
|
+
* this.props = props;
|
|
18
|
+
* };
|
|
19
|
+
* };
|
|
20
|
+
*/
|
|
21
|
+
class CommonConstruct extends constructs_1.Construct {
|
|
22
|
+
props;
|
|
23
|
+
acmManager;
|
|
24
|
+
apiManager;
|
|
25
|
+
appConfigManager;
|
|
26
|
+
codeBuildManager;
|
|
27
|
+
cloudFrontManager;
|
|
28
|
+
cloudTrailManager;
|
|
29
|
+
cloudWatchManager;
|
|
30
|
+
dynamodbManager;
|
|
31
|
+
ecrManager;
|
|
32
|
+
ecsManager;
|
|
33
|
+
efsManager;
|
|
34
|
+
eksManager;
|
|
35
|
+
elasticacheManager;
|
|
36
|
+
eventManager;
|
|
37
|
+
eventTargetManager;
|
|
38
|
+
evidentlyManager;
|
|
39
|
+
iamManager;
|
|
40
|
+
kmsManager;
|
|
41
|
+
lambdaManager;
|
|
42
|
+
logManager;
|
|
43
|
+
route53Manager;
|
|
44
|
+
s3Manager;
|
|
45
|
+
secretsManager;
|
|
46
|
+
sfnManager;
|
|
47
|
+
snsManager;
|
|
48
|
+
sqsManager;
|
|
49
|
+
ssmManager;
|
|
50
|
+
vpcManager;
|
|
51
|
+
wafManager;
|
|
52
|
+
fullyQualifiedDomainName;
|
|
53
|
+
constructor(parent, id, props) {
|
|
54
|
+
super(parent, id);
|
|
55
|
+
this.props = props;
|
|
56
|
+
this.acmManager = new services_1.AcmManager();
|
|
57
|
+
this.apiManager = new services_1.ApiManager();
|
|
58
|
+
this.appConfigManager = new services_1.AppConfigManager();
|
|
59
|
+
this.codeBuildManager = new services_1.CodeBuildManager();
|
|
60
|
+
this.cloudFrontManager = new services_1.CloudFrontManager();
|
|
61
|
+
this.cloudTrailManager = new services_1.CloudTrailManager();
|
|
62
|
+
this.cloudWatchManager = new services_1.CloudWatchManager();
|
|
63
|
+
this.dynamodbManager = new services_1.DynamodbManager();
|
|
64
|
+
this.ecrManager = new services_1.EcrManager();
|
|
65
|
+
this.ecsManager = new services_1.EcsManager();
|
|
66
|
+
this.efsManager = new services_1.EfsManager();
|
|
67
|
+
this.eksManager = new services_1.EksManager();
|
|
68
|
+
this.elasticacheManager = new services_1.ElastiCacheManager();
|
|
69
|
+
this.eventManager = new services_1.EventManager();
|
|
70
|
+
this.eventTargetManager = new services_1.EventTargetManager();
|
|
71
|
+
this.evidentlyManager = new services_1.EvidentlyManager();
|
|
72
|
+
this.iamManager = new services_1.IamManager();
|
|
73
|
+
this.kmsManager = new services_1.KmsManager();
|
|
74
|
+
this.lambdaManager = new services_1.LambdaManager();
|
|
75
|
+
this.logManager = new services_1.LogManager();
|
|
76
|
+
this.route53Manager = new services_1.Route53Manager();
|
|
77
|
+
this.s3Manager = new services_1.S3Manager();
|
|
78
|
+
this.secretsManager = new services_1.SecretsManager();
|
|
79
|
+
this.sfnManager = new services_1.SfnManager();
|
|
80
|
+
this.snsManager = new services_1.SnsManager();
|
|
81
|
+
this.sqsManager = new services_1.SqsManager();
|
|
82
|
+
this.ssmManager = new services_1.SsmManager();
|
|
83
|
+
this.vpcManager = new services_1.VpcManager();
|
|
84
|
+
this.wafManager = new services_1.WafManager();
|
|
85
|
+
this.determineFullyQualifiedDomain();
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* @summary Helper method to add CloudFormation outputs from the construct
|
|
89
|
+
* @param id scoped id of the resource
|
|
90
|
+
* @param value the value of the exported output
|
|
91
|
+
* @param description optional description for the output
|
|
92
|
+
* @param overrideId Flag which indicates whether to override the default logical id of the output
|
|
93
|
+
*/
|
|
94
|
+
addCfnOutput(id, value, description, overrideId = true) {
|
|
95
|
+
return (0, utils_1.createCfnOutput)(id, this, value, description, overrideId);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* @summary Determine the fully qualified domain name based on domainName & subDomain
|
|
99
|
+
*/
|
|
100
|
+
determineFullyQualifiedDomain() {
|
|
101
|
+
this.fullyQualifiedDomainName = this.props.subDomain
|
|
102
|
+
? `${this.props.subDomain}.${this.props.domainName}`
|
|
103
|
+
: this.props.domainName;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* @summary Utility method to determine if the initialisation is in development (dev) stage
|
|
107
|
+
* This is determined by the stage property injected via cdk context
|
|
108
|
+
*/
|
|
109
|
+
isDevelopmentStage = () => (0, common_1.isDevStage)(this.props.stage);
|
|
110
|
+
/**
|
|
111
|
+
* @summary Utility method to determine if the initialisation is in test (tst) stage
|
|
112
|
+
* This is determined by the stage property injected via cdk context
|
|
113
|
+
*/
|
|
114
|
+
isTestStage = () => (0, common_1.isTestStage)(this.props.stage);
|
|
115
|
+
/**
|
|
116
|
+
* @summary Utility method to determine if the initialisation is in uat (uat) stage
|
|
117
|
+
* This is determined by the stage property injected via cdk context
|
|
118
|
+
*/
|
|
119
|
+
isUatStage = () => (0, common_1.isUatStage)(this.props.stage);
|
|
120
|
+
/**
|
|
121
|
+
* @summary Utility method to determine if the initialisation is in production (prd) stage
|
|
122
|
+
* This is determined by the stage property injected via cdk context
|
|
123
|
+
*/
|
|
124
|
+
isProductionStage = () => (0, common_1.isPrdStage)(this.props.stage);
|
|
125
|
+
}
|
|
126
|
+
exports.CommonConstruct = CommonConstruct;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./construct"), exports);
|
|
18
|
+
__exportStar(require("./stack"), exports);
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { App, Stack, StackProps } from 'aws-cdk-lib';
|
|
2
|
+
import { Runtime } from 'aws-cdk-lib/aws-lambda';
|
|
3
|
+
import { CommonConstruct } from './construct';
|
|
4
|
+
import { CommonStackProps } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* @classdesc Common stack to use as a base for all higher level constructs.
|
|
7
|
+
* @example
|
|
8
|
+
* import { CommonStack } from '@gradientedge/cdk-utils'
|
|
9
|
+
*
|
|
10
|
+
* class CustomStack extends CommonStack {
|
|
11
|
+
* constructor(parent: App, name: string, props: StackProps) {
|
|
12
|
+
* super(parent, name, props)
|
|
13
|
+
* // provision resources
|
|
14
|
+
* }
|
|
15
|
+
* }
|
|
16
|
+
*/
|
|
17
|
+
export declare class CommonStack extends Stack {
|
|
18
|
+
static NODEJS_RUNTIME: Runtime;
|
|
19
|
+
construct: CommonConstruct;
|
|
20
|
+
props: CommonStackProps;
|
|
21
|
+
constructor(parent: App, name: string, props: StackProps);
|
|
22
|
+
/**
|
|
23
|
+
* @summary Method to determine the core CDK construct properties injected via context cdk.json
|
|
24
|
+
* @param props The stack properties
|
|
25
|
+
* @returns The stack properties
|
|
26
|
+
*/
|
|
27
|
+
protected determineConstructProps(props: StackProps): {
|
|
28
|
+
domainName: any;
|
|
29
|
+
excludeDomainNameForBuckets: any;
|
|
30
|
+
extraContexts: any;
|
|
31
|
+
logRetention: any;
|
|
32
|
+
name: string;
|
|
33
|
+
nodejsRuntime: any;
|
|
34
|
+
region: any;
|
|
35
|
+
skipStageForARecords: any;
|
|
36
|
+
stackName: string | undefined;
|
|
37
|
+
stage: any;
|
|
38
|
+
subDomain: any;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* @summary Method to determine extra cdk contexts apart from the main cdk.json
|
|
42
|
+
* - Sets the properties from the extra contexts into cdk node context
|
|
43
|
+
* - Primary use is to have layered config in separate files to enable easier maintenance and readability
|
|
44
|
+
*/
|
|
45
|
+
protected determineExtraContexts(): void;
|
|
46
|
+
/**
|
|
47
|
+
* @summary Method to determine extra cdk stage contexts apart from the main cdk.json
|
|
48
|
+
* - Sets the properties from the extra stage contexts into cdk node context
|
|
49
|
+
* - Primary use is to have layered config for each environment which is injected into the context
|
|
50
|
+
*/
|
|
51
|
+
protected determineStageContexts(): void;
|
|
52
|
+
/**
|
|
53
|
+
* @summary Determine the fully qualified domain name based on domainName & subDomain
|
|
54
|
+
*/
|
|
55
|
+
protected fullyQualifiedDomain(): any;
|
|
56
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CommonStack = void 0;
|
|
7
|
+
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
8
|
+
const aws_lambda_1 = require("aws-cdk-lib/aws-lambda");
|
|
9
|
+
const fs_1 = __importDefault(require("fs"));
|
|
10
|
+
const construct_1 = require("./construct");
|
|
11
|
+
const app_root_path_1 = __importDefault(require("app-root-path"));
|
|
12
|
+
const common_1 = require("../../common");
|
|
13
|
+
/**
|
|
14
|
+
* @classdesc Common stack to use as a base for all higher level constructs.
|
|
15
|
+
* @example
|
|
16
|
+
* import { CommonStack } from '@gradientedge/cdk-utils'
|
|
17
|
+
*
|
|
18
|
+
* class CustomStack extends CommonStack {
|
|
19
|
+
* constructor(parent: App, name: string, props: StackProps) {
|
|
20
|
+
* super(parent, name, props)
|
|
21
|
+
* // provision resources
|
|
22
|
+
* }
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
25
|
+
class CommonStack extends aws_cdk_lib_1.Stack {
|
|
26
|
+
static NODEJS_RUNTIME = aws_lambda_1.Runtime.NODEJS_18_X;
|
|
27
|
+
construct;
|
|
28
|
+
props;
|
|
29
|
+
constructor(parent, name, props) {
|
|
30
|
+
super(parent, name, props);
|
|
31
|
+
/* determine extra cdk contexts */
|
|
32
|
+
this.determineExtraContexts();
|
|
33
|
+
/* determine extra cdk stage contexts */
|
|
34
|
+
this.determineStageContexts();
|
|
35
|
+
this.props = this.determineConstructProps(props);
|
|
36
|
+
/* initialise the construct */
|
|
37
|
+
this.construct = new construct_1.CommonConstruct(this, 'cdk-utils', this.props);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @summary Method to determine the core CDK construct properties injected via context cdk.json
|
|
41
|
+
* @param props The stack properties
|
|
42
|
+
* @returns The stack properties
|
|
43
|
+
*/
|
|
44
|
+
determineConstructProps(props) {
|
|
45
|
+
return {
|
|
46
|
+
domainName: this.node.tryGetContext('domainName'),
|
|
47
|
+
excludeDomainNameForBuckets: this.node.tryGetContext('excludeDomainNameForBuckets'),
|
|
48
|
+
extraContexts: this.node.tryGetContext('extraContexts'),
|
|
49
|
+
logRetention: this.node.tryGetContext('logRetention'),
|
|
50
|
+
name: props.stackName || 'cdk-utils',
|
|
51
|
+
nodejsRuntime: this.node.tryGetContext('nodejsRuntime') ?? CommonStack.NODEJS_RUNTIME,
|
|
52
|
+
region: this.node.tryGetContext('region'),
|
|
53
|
+
skipStageForARecords: this.node.tryGetContext('skipStageForARecords'),
|
|
54
|
+
stackName: props.stackName,
|
|
55
|
+
stage: this.node.tryGetContext('stage'),
|
|
56
|
+
subDomain: this.node.tryGetContext('subDomain'),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @summary Method to determine extra cdk contexts apart from the main cdk.json
|
|
61
|
+
* - Sets the properties from the extra contexts into cdk node context
|
|
62
|
+
* - Primary use is to have layered config in separate files to enable easier maintenance and readability
|
|
63
|
+
*/
|
|
64
|
+
determineExtraContexts() {
|
|
65
|
+
const extraContexts = this.node.tryGetContext('extraContexts');
|
|
66
|
+
const debug = this.node.tryGetContext('debug');
|
|
67
|
+
if (!extraContexts) {
|
|
68
|
+
if (debug)
|
|
69
|
+
console.debug(`No additional contexts provided. Using default context properties from cdk.json`);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
extraContexts.forEach((context) => {
|
|
73
|
+
const extraContextPath = `${app_root_path_1.default.path}/${context}`;
|
|
74
|
+
/* scenario where extra context is configured in cdk.json but absent in file system */
|
|
75
|
+
if (!fs_1.default.existsSync(extraContextPath))
|
|
76
|
+
throw `Extra context properties unavailable in path:${extraContextPath}`;
|
|
77
|
+
/* read the extra properties */
|
|
78
|
+
const extraContextPropsBuffer = fs_1.default.readFileSync(extraContextPath);
|
|
79
|
+
if (debug)
|
|
80
|
+
console.debug(`Adding additional contexts provided in ${extraContextPath}`);
|
|
81
|
+
/* parse as JSON properties */
|
|
82
|
+
const extraContextProps = JSON.parse(extraContextPropsBuffer.toString('utf-8'));
|
|
83
|
+
/* set each of the property into the cdk node context */
|
|
84
|
+
Object.keys(extraContextProps).forEach((propKey) => {
|
|
85
|
+
this.node.setContext(propKey, extraContextProps[propKey]);
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @summary Method to determine extra cdk stage contexts apart from the main cdk.json
|
|
91
|
+
* - Sets the properties from the extra stage contexts into cdk node context
|
|
92
|
+
* - Primary use is to have layered config for each environment which is injected into the context
|
|
93
|
+
*/
|
|
94
|
+
determineStageContexts() {
|
|
95
|
+
const stage = this.node.tryGetContext('stage');
|
|
96
|
+
const stageContextPath = this.node.tryGetContext('stageContextPath') || 'cdkEnv';
|
|
97
|
+
const stageContextFilePath = `${app_root_path_1.default.path}/${stageContextPath}/${stage}.json`;
|
|
98
|
+
const debug = this.node.tryGetContext('debug');
|
|
99
|
+
if ((0, common_1.isDevStage)(stage)) {
|
|
100
|
+
if (debug)
|
|
101
|
+
console.debug(`Development stage. Using default stage context properties`);
|
|
102
|
+
}
|
|
103
|
+
/* alert default context usage when extra stage config is missing */
|
|
104
|
+
if (!fs_1.default.existsSync(stageContextFilePath)) {
|
|
105
|
+
if (debug)
|
|
106
|
+
console.debug(`Stage specific context properties unavailable in path:${stageContextFilePath}`);
|
|
107
|
+
if (debug)
|
|
108
|
+
console.debug(`Using default stage context properties for ${stage} stage`);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
/* read the extra properties */
|
|
112
|
+
const stageContextPropsBuffer = fs_1.default.readFileSync(stageContextFilePath);
|
|
113
|
+
if (debug)
|
|
114
|
+
console.debug(`Adding additional stage contexts provided in ${stageContextFilePath}`);
|
|
115
|
+
/* parse as JSON properties */
|
|
116
|
+
const stageContextProps = JSON.parse(stageContextPropsBuffer.toString('utf-8'));
|
|
117
|
+
/* set each of the property into the cdk node context */
|
|
118
|
+
Object.keys(stageContextProps).forEach((propKey) => {
|
|
119
|
+
/* handle object, array properties */
|
|
120
|
+
if (typeof stageContextProps[propKey] === 'object' && !Array.isArray(stageContextProps[propKey])) {
|
|
121
|
+
this.node.setContext(propKey, {
|
|
122
|
+
...this.node.tryGetContext(propKey),
|
|
123
|
+
...stageContextProps[propKey],
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
/* handle all other primitive properties */
|
|
128
|
+
this.node.setContext(propKey, stageContextProps[propKey]);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* @summary Determine the fully qualified domain name based on domainName & subDomain
|
|
134
|
+
*/
|
|
135
|
+
fullyQualifiedDomain() {
|
|
136
|
+
const domainName = this.node.tryGetContext('domainName');
|
|
137
|
+
const subDomain = this.node.tryGetContext('subDomain');
|
|
138
|
+
return subDomain ? `${subDomain}.${domainName}` : domainName;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
exports.CommonStack = CommonStack;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StackProps } from 'aws-cdk-lib';
|
|
2
|
+
import { Runtime, Tracing } from 'aws-cdk-lib/aws-lambda';
|
|
3
|
+
import { RetentionDays } from 'aws-cdk-lib/aws-logs';
|
|
4
|
+
import { BaseProps } from '../../common';
|
|
5
|
+
/**
|
|
6
|
+
*/
|
|
7
|
+
export interface CommonStackProps extends BaseProps, StackProps {
|
|
8
|
+
region: string;
|
|
9
|
+
logRetention?: RetentionDays;
|
|
10
|
+
defaultReservedLambdaConcurrentExecutions?: number;
|
|
11
|
+
defaultTracing?: Tracing;
|
|
12
|
+
excludeDomainNameForBuckets?: boolean;
|
|
13
|
+
nodejsRuntime?: Runtime;
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./common"), exports);
|
|
18
|
+
__exportStar(require("./construct"), exports);
|
|
19
|
+
__exportStar(require("./services"), exports);
|
|
20
|
+
__exportStar(require("./types"), exports);
|
|
21
|
+
__exportStar(require("./utils"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AwsCredentialIdentityProvider } from '@aws-sdk/types';
|
|
2
2
|
import { CfnOutput } from 'aws-cdk-lib';
|
|
3
|
-
import { CommonConstruct } from '
|
|
3
|
+
import { CommonConstruct } from '../common';
|
|
4
4
|
/**
|
|
5
5
|
* @summary Helper method to add CloudFormation outputs from the construct
|
|
6
6
|
* @param id scoped id of the resource
|
|
@@ -15,3 +15,31 @@ export declare function createCfnOutput(id: string, scope: CommonConstruct, valu
|
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
17
|
export declare function determineCredentials(): AwsCredentialIdentityProvider;
|
|
18
|
+
/**
|
|
19
|
+
* @param error
|
|
20
|
+
*/
|
|
21
|
+
export declare function redirectError(error: any): {
|
|
22
|
+
body: string;
|
|
23
|
+
headers: {
|
|
24
|
+
'Access-Control-Allow-Origin': string;
|
|
25
|
+
};
|
|
26
|
+
isBase64Encoded: boolean;
|
|
27
|
+
statusCode: number;
|
|
28
|
+
} & {
|
|
29
|
+
body: string;
|
|
30
|
+
statusCode: number;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* @param message
|
|
34
|
+
*/
|
|
35
|
+
export declare function redirectSuccess(message: any): {
|
|
36
|
+
body: string;
|
|
37
|
+
headers: {
|
|
38
|
+
'Access-Control-Allow-Origin': string;
|
|
39
|
+
};
|
|
40
|
+
isBase64Encoded: boolean;
|
|
41
|
+
statusCode: number;
|
|
42
|
+
} & {
|
|
43
|
+
body: string;
|
|
44
|
+
statusCode: number;
|
|
45
|
+
};
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.determineCredentials = exports.createCfnOutput = void 0;
|
|
6
|
+
exports.redirectSuccess = exports.redirectError = exports.determineCredentials = exports.createCfnOutput = void 0;
|
|
7
7
|
const credential_providers_1 = require("@aws-sdk/credential-providers");
|
|
8
8
|
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
9
9
|
const lodash_1 = __importDefault(require("lodash"));
|
|
@@ -38,3 +38,34 @@ function determineCredentials() {
|
|
|
38
38
|
return (0, credential_providers_1.fromEnv)();
|
|
39
39
|
}
|
|
40
40
|
exports.determineCredentials = determineCredentials;
|
|
41
|
+
/**
|
|
42
|
+
*/
|
|
43
|
+
const defaultResponseObject = {
|
|
44
|
+
body: '',
|
|
45
|
+
headers: {
|
|
46
|
+
'Access-Control-Allow-Origin': '*',
|
|
47
|
+
},
|
|
48
|
+
isBase64Encoded: false,
|
|
49
|
+
statusCode: 200,
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* @param error
|
|
53
|
+
*/
|
|
54
|
+
function redirectError(error) {
|
|
55
|
+
console.error(error, error.message, error.stack);
|
|
56
|
+
return Object.assign({}, defaultResponseObject, {
|
|
57
|
+
body: JSON.stringify(Object.assign({}, { error: error.message, success: false })),
|
|
58
|
+
statusCode: 500,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
exports.redirectError = redirectError;
|
|
62
|
+
/**
|
|
63
|
+
* @param message
|
|
64
|
+
*/
|
|
65
|
+
function redirectSuccess(message) {
|
|
66
|
+
return Object.assign({}, defaultResponseObject, {
|
|
67
|
+
body: JSON.stringify(Object.assign({}, { error: message, success: true })),
|
|
68
|
+
statusCode: 200,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
exports.redirectSuccess = redirectSuccess;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { TerraformStack } from 'cdktf';
|
|
2
|
+
import { Construct } from 'constructs';
|
|
3
|
+
import { AzureStorageManager } from '../services';
|
|
4
|
+
import { CommonAzureStackProps } from './types';
|
|
5
|
+
export declare class CommonAzureConstruct extends TerraformStack {
|
|
6
|
+
props: CommonAzureStackProps;
|
|
7
|
+
id: string;
|
|
8
|
+
fullyQualifiedDomainName: string;
|
|
9
|
+
storageManager: AzureStorageManager;
|
|
10
|
+
constructor(scope: Construct, id: string, props: CommonAzureStackProps);
|
|
11
|
+
/**
|
|
12
|
+
* @summary Determine the fully qualified domain name based on domainName & subDomain
|
|
13
|
+
*/
|
|
14
|
+
protected determineFullyQualifiedDomain(): void;
|
|
15
|
+
/**
|
|
16
|
+
* @summary Utility method to determine if the initialisation is in development (dev) stage
|
|
17
|
+
* This is determined by the stage property injected via cdk context
|
|
18
|
+
*/
|
|
19
|
+
isDevelopmentStage: () => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @summary Utility method to determine if the initialisation is in test (tst) stage
|
|
22
|
+
* This is determined by the stage property injected via cdk context
|
|
23
|
+
*/
|
|
24
|
+
isTestStage: () => boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @summary Utility method to determine if the initialisation is in uat (uat) stage
|
|
27
|
+
* This is determined by the stage property injected via cdk context
|
|
28
|
+
*/
|
|
29
|
+
isUatStage: () => boolean;
|
|
30
|
+
/**
|
|
31
|
+
* @summary Utility method to determine if the initialisation is in production (prd) stage
|
|
32
|
+
* This is determined by the stage property injected via cdk context
|
|
33
|
+
*/
|
|
34
|
+
isProductionStage: () => boolean;
|
|
35
|
+
}
|